create.optimized.setup {OSAT} | R Documentation |
Create a optimized sample assignment.
create.optimized.setup(fun = "default", sample, container, ...)
fun |
The name of the optimization function. When omitted, it is the same
as |
sample |
A |
container |
A |
... |
Additional parameters passed to optimization function. |
Currently two methods are
available: optimal.shuffle
(default) and optimal.block
methods. The function is equivalent to create.experiment.setup()
followed by corresponding optimization function of the same name.
A gExperimentSetup
object is returned to store all related information.
library("OSAT") # data as an example 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") ) gs gc <- setup.container(IlluminaBeadChip96Plate, 6, batch='plates') gc # demonstration only. nSim=5000 or more are commonly used. gSetup <- create.optimized.setup(sample=gs, container=gc, nSim=500)