Skip to content

complex table

2 messages · Michael Anyadike-Danes, Jacques VESLOT

#
it is not perfectly clear for me, but you could try :

DF[,1:72] <- as.data.frame(lapply(DF[,1:72], factor, levels=1:6))

lapply(split(DF, DF$cluster), function(x) apply(x[,-73], 2, table))
lapply(split(DF, DF$cluster), function(x) { x11() ; 
barplot(apply(x[,-73], 2, table)) })
lapply(split(DF, DF$cluster), function(x) { x11() ; 
barplot(apply(x[,-73], 2, table), beside=T) })



Michael Anyadike-Danes a écrit :