I'm glad it worked for you!
Just to be clear: in this case you can use
ggplot(). The key difference is really that
fill goes outside of
aes() when you want to assign a single color to your data .
This should still work:
ggplot(data = penguins, aes(x = species), fill = "green") + geom_bar()
When plots get more complicated, with multiple layers, I've found it helpful to assign
aes() per layer (as I showed above), so I've gotten in the habit of splitting them out.
If you want to assign colors based on the data itself, then you should place
aes(), and point to a column:
ggplot(data = penguins) +
geom_bar(aes(x = species,
fill = island))