Hi everyone, I'm new to R studio and I'm trying to make a bar graph plot with ggplot2. I have the "base" for the code, however im having a hard time figuring out what goes into certain parts. Here is a reprex of my dataset (also new to making a reprex) as well as the code im using. The error I'm encountering is with what to put for aes (x= y= and color)
picoeukaryotes sample
1 1834 Site 1
2 3139 Site 2
3 1361 Site 3
It's hard to tell exactly from your code (I assume your data frame has headers/column names), but I think in this case your x would be whatever the column name is for the Site variable.
Check out this quick start to barplots in ggplot2:
I added code formatting to your original post, which makes it easier to read what you posted (and, for instance, see how your data columns were supposed to align). I strongly encourage you to do this yourself in the future — you can read more about how code formatting works on this forum here: FAQ: How to make your code look nice? Markdown Formatting
(Tip: if you use the reprex package to process your code examples, it takes care of the formatting for you, and gives you a perfect, paste-ready chunk! )
A tiny note — you said you wanted to make a bar plot, but your code template is actually making a scatterplot (it has a geom_point() layer, instead of a geom_bar() or geom_col() layer). Hopefully you can adapt some of the very clear examples at mara's link to do what you want!