df<-data.frame(id=c(1:20),name=c('a','b','b','c','a','d','b','e','d','d','c','a','b','a','a','b','f','b','c','g'))
freq <- ave(rep(1, times=nrow(df)), df$name, FUN=sum)
rowSums(table(df$name,freq))
--
View this message in context:
http://r.789695.n4.nabble.com/Sorting-dataframe-by-number-of-occ
How to generate all possible samples of size 5 for the two variables in one
analysis.
--
View this message in context:
http://r.789695.n4.nabble.com/All-possible-samples-for-two-variables-tp3540107p3540107.html
Sent from the R help mailing list archive at Nabble.com.
2 matches
Mail list logo