| descriptives.trait {GenABEL} | R Documentation |
Function to generate descriptive summary tables for phenotypic data
descriptives.trait(data,subset,file,by.var=NULL,digits = 3)
data |
an object of |
subset |
Subset of people to run analysis on.
If missing, all people from |
file |
A string specifying the name of a file to write the tables to (default is no file otput). |
by.var |
a binary variable or a character scalar specifying the name of a binary trait in data; statistics will be produced separately for the groups and compared |
digits |
number of digits to be printed |
A table with descriptive statistics. Ptt: t-test; Pkw: kruskal.test; Pex: Fisher exact test (for factors with <5 levels)
Yurii Aulchenko
require(GenABEL.data) data(srdta) descriptives.trait(srdta) descriptives.trait(srdta,by.var=srdta@phdata$sex) descriptives.trait(srdta,by.var="sex") attach(phdata(srdta)) descriptives.trait(srdta,by.var=sex) detach(phdata(srdta))