Learn R Programming

abd (version 0.1-21)

Cichlids: Cichlid Mating Preference

Description

Preference index in F1 and F2 crosses of two species of cichlids from Lake Victoria, Pundamilia pundamilia and P. nyererei.

Usage

data(Cichlids)

Arguments

source

Haeslery, M.P. and O. Seehausen. 2005. Inheritance of female mating preference in a sympatric sibling species pair of Lake Victoria cichlids: implications for speciation. Proceedings of the Royal Society of London, Series B, Biological Sciences 272: 237-245.

References

http://rspb.royalsocietypublishing.org/content/272/1560/237.full.pdf

Examples

Run this code
data(Cichlids)
str(Cichlids)

if (require(Hmisc)) {
  summary(preference ~ genotype, Cichlids, fun = favstats)
} else {
  aggregate(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