I have an .csv file containing a table. I need to work with two columns out of the table, Year
and TV
.
I need to find the mean for each year (fresh, soph, jun, sen) then display it using barplot
. I tried to use tapply
/mean
/barplot
together but I just cant figure it out. So far I separated the data into sections based on the year and I know how to get mean()
, but I just cant combine them all into one barplot
. Is there a way to do this all in one code block using tapply
?