set-methods: Replacement functions to set components of a permutation...

set-methodsR Documentation

Replacement functions to set components of a permutation design

Description

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.

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
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.

Value

These replacement functions return object suitably modified.

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.

Author(s)

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)
setNperm(hh) <- 999
getNperm(hh)

permute documentation built on March 18, 2022, 7:36 p.m.