Random Factors

DESCRIPTION:

States or changes whether or not a factor is considered random by the varcomp function.

USAGE:

is.random(object, ...))
is.random(object) <- value

REQUIRED ARGUMENTS:

object
a factor or a data frame.

OPTIONAL ARGUMENTS:

value
a logical vector.
...
optional arguments which may be passed to specific methods.

VALUE:

a logical vector stating whether or not each factor contained in object is random or fixed.

SIDE EFFECTS:

the assignment form changes the status of factors in object . If value is shorter than the number of factors in object, then value is replicated.

DETAILS:

The is.random function is generic with a method for "data.frame" and a method for "factor".

A factor is random if it is of class "ranfact" which inherits from "factor".

SEE ALSO:

, .

EXAMPLES:

guayule <- guayule  # create a local copy of the data frame
is.random(guayule[, c("reps", "flats")]) <- T
is.random(guayule)
rm(guayule)