Skip to contents

These 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) <- value

Arguments

object

An R object on which to dispatch.

value

The replacement value or object.

Value

object, suitably modified.

Details

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.

Author

Gavin Simpson

Examples

hh <- how()
getNperm(hh)
#> [1] 199
setNperm(hh) <- 999
getNperm(hh)
#> [1] 999