Displaying 1 result from an estimated 1 matches for "vardist1".
Did you mean:
vardist
2007 Aug 09
1
plot table with sapply - labeling problems
...le names when using
sapply unsucessfully.
I can't seem to extract the names for the indiviual plots:
test<-as.data.frame(cbind(round(runif(50,0,5)),round(runif(50,0,3)),roun
d(runif(50,0,4))))
sapply(test, table)->vardist
sapply(test, function(x) round(table(x)/sum(table(x))*100,1) )->vardist1
par(mfrow=c(1,3))
sapply(vardist1, function(x) barplot(x,
ylim=c(0,100),main="Varset1",xlab=names(x)))
par(mfrow=c(1,1))
Names don't show up although names(vardist) works.
Also I would like to put a single Title on this plot instead of
repeating "Varset...