Re: [R] Sorting dataframe by number of occurrences of factor

2011-04-30 Thread Sharma D
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

[R] All possible samples for two variables

2011-05-21 Thread Sharma D
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.