Simple functions to allow abstracted replacement of components of a permutation design, for example as returned by how. In addition to performing replacement of components of the list returned by how, these replacement function also update the matched calls stored within the list to facilitate the use of update by users.

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
setConstant(object) <- value

Arguments

object

An R object to dispatch on.

value

The replacement value/object.

Details

These are replacement functions for working with permutation design objects created by how. They should be used in preference to directly updating the permutation design in case the internal structure of object changes as permute is developed and because the matched call also needs to be updated to facilitate use of update on the how object.

Note

setStrata<- has methods for objects of class "how" and "Plots". The former sets the blocks component of the how object, whilst 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 components with getPlots or getWithin and alter those components, then use the resulting object to replace the plots or within components using setPlots or setWithin.

Value

These replacement functions return object suitably modified.

Author

Gavin Simpson

See also

check, a utility function for checking permutation scheme described by how. Comparable extractor functions are also available; see get-methods.

Examples

## extract components from a "how" object
hh <- how()
getNperm(hh)
#> [1] 199
setNperm(hh) <- 999
getNperm(hh)
#> [1] 999