Hi, I have a data frame that looks like this: ID Var Var2 Var3 xxx 100 909 920 yyy 110 720 710 zzz 140 680 690
I can load the file and produce a plot from values from one column. > data <- read.csv("test.csv") > barplot(data$Var2) So far it's fine. The data frame however has more columns with integer values in reality and I want to plot from consecutive values of the SAME ROW. Something like: > barplot(data[1, 2:3]) or more generic: > barplot(data[row.id, from.field:to.field]) Unfortunately this no longer is a vector! I understand that it could contain non-numeric values which in my data frame is not the case. How can I convert a "horizontal" one-line-data-frame into a vector? Any help appreciated, best regards, Jörg ______________________________________________ R-help@r-project.org mailing list 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.