as.random {GAD}R Documentation

Encodes a vector as a "random factor"

Description

Assigns a class "random" to a vector

Usage

as.random(x)

Arguments

x

a vector of data, usually a nominal variable.

Details

The function works the same way as as.factor, but assigns an additional class informing that it is a random factor.

Value

Function as.random returns an object of class "factor" and "random".

Author(s)

Leonardo Sandrini-Neto (leonardosandrini@ufpr.br)

See Also

as.fixed

Examples

library(GAD)
data(rohlf95)
CG <- as.fixed(rohlf95$cages)
MQ <- as.random(rohlf95$mosquito)
class(CG)
class(MQ)

[Package GAD version 2.0 Index]