List of occuring values
Hi Ferri,
Do you mean getting something like the vector of original values back?
boodat<-sample(LETTERS[1:4],100,TRUE)
bootab<-table(boodat)
untab<-function(x) {
lenx<-length(x)
newx<-NULL
for(i in 1:lenx) newx<-c(newx,rep(names(x)[i],x[i]))
return(newx)
}
untab(bootab)
Jim
On Thu, Sep 21, 2017 at 11:01 PM, Ferri Leberl <ferri.leberl at gmx.at> wrote:
Dear all, ftable produces a list of the frequencies of all occuring values. But how about the occuring values? How can I retrieve a list of occuring values? How can I retrieve a table with both the list of occuring values and their respective frequencies? Thank you in advance, Yours, Ferri
______________________________________________ R-help at 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.