Learn R Programming

GenABEL (version 1.8-0)

descriptives.trait: Function to generate descriptive summary tables for phenotypic data

Description

Function to generate descriptive summary tables for phenotypic data

Usage

descriptives.trait(data,subset,file,by.var=NULL,digits = 3)

Arguments

data
subset
Subset of people to run analysis on. If missing, all people from data are used for analysis.
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

Value

A table with descriptive statistics. Ptt: t-test; Pkw: kruskal.test; Pex: Fisher exact test (for factors with <5 levels)="" <="" dl="">

Examples

Run this code
	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))

Run the code above in your browser using DataLab