gSample-class: Class 'gSample'

Description Usage Arguments Value Slots Methods Examples

Description

Create a class used for storage of sample related information.

Usage

1
2
setup.sample(x, optimal, strata)
summary(object, ...)

Arguments

x

a data frame holds sample variables.

optimal

a vector of sample varible names to be treated as optimal variables.

strata

a vector of sample varible names to be treated as block variables. If omitted, the first element of optimal vector is treated as strata.

object

an object of class gSample.

...

additional arguments affecting the summary produced.

Value

An object of gSample class for function setup.sample(). A list of two tables for function summary(object):

strataTable

Sample freqency table by stata variables.

optimalTable

Sample freqency table by optimal variables.

Slots

rawData:

Object of class "data.frame" The original data frame that holds the sample informaiton.

optimal:

Object of class "character" A charactor vector of column names in the sample info data frame. Represent the optimal variables.

strata:

Object of class "character" A charactor vector of column names in the sample info data frame. Represent the blocking variables.

data:

Object of class "list" A list holds summaries and other useful information.

Methods

show

signature(object = "gSample"): ...

Examples

1
2
3
4
inPath <- system.file("extdata", package="OSAT")
pheno <- read.table(file.path(inPath, 'samples.txt'), header=TRUE, sep="\t")
## create object to hold sample information
gs <- setup.sample(pheno,  optimal=c("SampleType", "Race", "AgeGrp"), strata=c("SampleType") )

llrs/OSAT documentation built on May 23, 2019, 7:18 a.m.