I have a dataframe and I want a barplot for each row in this dataframe.
for(i in levels(myDf$name)) {
barplot(cbind(unlist(myDf[i, 1:2]), unlist(myDf[i, 3:4])), beside=TRUE)
}
However, that does not work. It gives me no output... How would I plot that in one window so that I can export it to a file?!
*edit:
myDf<-data.frame(name=c('xyz','ybc','def'),
var1=c(2,8,7),
var2=c(1,4,5),
var3=c(3.8,2.5,8.4),
var4=c(93.8,42.5,91.4))
