is.randomFactor {designr}R Documentation

Checking factor design data types

Description

Check if argument is a design factor (either random or fixed factor), specifically a random factor, a fixed factor or a factor design.

Usage

is.randomFactor(fac)

is.fixedFactor(fac)

is.factorDesign(fac)

is.designFactor(fac)

Arguments

fac

Object to check.

Value

TRUE or FALSE

Functions

Examples


x <- fixed.factor("factor", c("level1","level2"))
y <- random.factor("factor")

stopifnot(is.fixedFactor(x) && !is.randomFactor(x))
stopifnot(!is.fixedFactor(y) && is.randomFactor(y))
stopifnot(is.designFactor(x) && is.designFactor(y))


[Package designr version 0.1.13 Index]