Learn R Programming

GenABEL (version 1.8-0)

catable: function to generate summary table for quantitative data

Description

This function makes a table with number of observations which fall between user-defined categories

Usage

catable(data, categories = c(quantile(data,c(0.01,0.1,0.5,0.9,0.99),na.rm=TRUE)), cumulative = FALSE, na.rm = TRUE, digits = 3)

Arguments

data
A vector of numerics
categories
vector containing desired cut-off levels
cumulative
whether cumulative distribution should be shown
na.rm
how to treat NAs
digits
number of digits to be saved in rounding

Value

table with number and proportion of observations falling between categories

See Also

summary.snp.data, perid.summary

Examples

Run this code
	require(GenABEL.data)
	data(srdta)
	callr <- summary(srdta@gtdata)[,"CallRate"]
	catable(callr,c(0.93,0.95,0.99))
	catable(callr)
	catable(callr,cum=TRUE)

Run the code above in your browser using DataLab