Felipe wrote:
i calculated the density and wanna do something like this
separate in 0-19-29-39-49-59-69-79-99
and put in these spaces 8 densities .. 0.something
i have the frequency in % and divided already in 20 or 10 to get the density
i tried and tried..made breaks vector to separate but couldn't put the other
vector with the frequency density onit directly
anyone know how to do it??
Hi Felipe,
Try this:
library(plotrix)
testdat<-sample(1:100,1000,TRUE)
testfac<-cut(testdat,breaks=seq(0,100,by=10))
library(prettyR)
testdensity<-as.vector(freq(testfac,display.na=FALSE)[[1]])
barp(testdensity/1000,names.arg=names(testdensity),staxx=TRUE)
Jim
______________________________________________
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.