str(Cichlids)
summary(preference ~ genotype, Cichlids, fun = favstats)
if (require(plyr)) {
ddply(Cichlids, .(genotype),
function(df)c(mean = mean(df$preference),
standard.deviation = sd(df$preference),
n = length(df$preference)))
}
Run the code above in your browser using DataLab