Learn R Programming

permute (version 0.9-7)

get-methods: Extractor functions to access components of a permutation design

Description

Simple functions to allow abstracted access to components of a permutation design, for example as returned by how. Whilst many of these are very simple index opertations on a list, using these rather than directly accessing that list allows the internal representation of the permutation design to change without breaking code.

Usage

getAllperms(object, ...)
getBlocks(object, ...)
getComplete(object, ...)
getConstant(object, ...)
getCol(object, ...)
getDim(object, ...)
getMake(object, ...)
getMaxperm(object, ...)
getMinperm(object, ...)
getMirror(object, ...)
getNperm(object, ...)
getObserved(object, ...)
getPlots(object, ...)
getRow(object, ...)
getStrata(object, ...)
getType(object, ...)
getWithin(object, ...)
getControl(object, ...)
getHow(object, ...)

# S3 method for how getAllperms(object, ...)

# S3 method for how getBlocks(object, ...)

# S3 method for how getCol(object, which = c("plots", "within"), ...) # S3 method for Plots getCol(object, ...) # S3 method for Within getCol(object, ...)

# S3 method for how getComplete(object, ...)

# S3 method for how getConstant(object, ...) # S3 method for Within getConstant(object, ...)

# S3 method for how getDim(object, which = c("plots", "within"), ...) # S3 method for Plots getDim(object, ...) # S3 method for Within getDim(object, ...)

# S3 method for how getMake(object, ...)

# S3 method for how getMaxperm(object, ...)

# S3 method for how getMinperm(object, ...)

# S3 method for how getMirror(object, which = c("plots", "within"), ...) # S3 method for Plots getMirror(object, ...) # S3 method for Within getMirror(object, ...)

# S3 method for how getNperm(object, ...)

# S3 method for how getObserved(object, ...)

# S3 method for how getPlots(object, ...)

# S3 method for how getRow(object, which = c("plots", "within"), ...) # S3 method for Plots getRow(object, ...) # S3 method for Within getRow(object, ...)

# S3 method for how getStrata(object, which = c("plots", "blocks"), drop = TRUE, ...) # S3 method for Plots getStrata(object, drop = TRUE, ...)

# S3 method for how getType(object, which = c("plots", "within"), ...) # S3 method for Plots getType(object, ...) # S3 method for Within getType(object, ...)

# S3 method for how getWithin(object, ...)

# S3 method for allPerms getControl(object, ...)

Arguments

object

An R object to dispatch on.

which

character; which level of restriction to extract information for.

drop

logical; should un-used factor levels be dropped?

Arguments passed on to other methods.

Value

These are simple extractor functions and return the contents of the corresponding components of object.

Details

These are extractor functions for working with permutation design objects created by how. They should be used in preference to directly subsetting the permutation design in case the internal structure of object changes as permute is developed.

getHow is an alias for getControl; specific methods are implemented for getControl if you are debugging.

See Also

check, a utility function for checking permutation scheme described by how.

Examples

Run this code
# NOT RUN {
## extract components from a "how" object
hh <- how()
getWithin(hh)
getNperm(hh)
# }

Run the code above in your browser using DataLab