Replacement functions to set components of a permutation design
Source:R/setFoo-methods.R
set-methods.RdThese functions provide abstracted replacement of components in a
permutation design such as one returned by how(). They also update the
matched calls stored in the design so that stats::update() continues to
work correctly.
Usage
setBlocks(object) <- value
setPlots(object) <- value
setWithin(object) <- value
setStrata(object) <- value
setNperm(object) <- value
setAllperms(object) <- value
setMaxperm(object) <- value
setMinperm(object) <- value
setComplete(object) <- value
setMake(object) <- value
setObserved(object) <- value
setRow(object) <- value
setCol(object) <- value
setDim(object) <- value
setType(object) <- value
setMirror(object) <- value
setSymmetric(object) <- value
setConstant(object) <- valueDetails
Use these functions instead of directly modifying the underlying list, so code does not depend on permute's internal representation.
Note
setStrata<- has methods for objects of class "how" and "Plots". The
former sets the blocks component of the how() object, while the latter
sets the strata component of the Plots() object.
setDim<-, setRow<-, and setCol<- cannot be used on an object of class
"how". Instead, extract the Plots() or Within() component with
getPlots() or getWithin(), alter it, and replace it with setPlots<- or
setWithin<-.
See also
check() checks a design described by how(). See get-methods
for the corresponding extractor functions.