gSample-class {OSAT} | R Documentation |
gSample
Create a class used for storage of sample related information.
setup.sample(x, optimal, strata) summary(object, ...)
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 |
object |
an object of class |
... |
additional arguments affecting the summary produced. |
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. |
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.
signature(object = "gSample")
: ...
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") )