Hello R-users,
My toy example:
aa<-c(1:5)
bb<-c(NA,2,NA,4,5)
cc<-c(1,2,NA,4,NA)
dd<-c("A","B","B","A","C")
df<-data.frame(aa,bb,cc,dd=as.factor(dd))
table(unlist(df[,1:3]))
Can anyone point me to what function let's me do a crosstabulation between
table(unlist(df[,1:3])) and df$dd?
I want to find out when dd==A (or B, or C) how many times do the values 1, 2
,3,.. appear in df[,1:3]?
Thank you very much!
Eugen Pircalabelu
______________________________________________
[email protected] 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.