On Sun, Aug 19, 2018 at 7:15 AM <c...@disroot.org> wrote: > > August 19, 2018 4:58 AM, "Peter Langfelder" <peter.langfel...@gmail.com> > wrote: > > > To the OP, try formatting the data to be plotted as a matrix, not as a > > vector > > CSV data provided in a previous message; is not the data formatted as a > matrix?
I meant the data you give to barplot - your code supplies only the third column of the data frame, so barplot only sees a vector. I would try something like plotData = do.call(cbind, tapply(csv.data$percentage, csv.data$year, identity)) barplot(plotData, <rest of your argument>) Peter ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.