Learn R Programming

rAverage (version 0.4-10)

rav.grid: Generating an empty dataset in rav format

Description

rav.grid is a function that generates an empty (NAs filled) dataset according to the 'rAverage' format.

Usage

rav.grid(lev, trials = 1, subset = FALSE, names = NULL)

Arguments

lev
Vector containing the number of levels of each factor. For instance, two factors with respectively 3 and 4 levels require lev = c(3,4).
trials
Number of rows of the output matrix.
subset
Logical. Indicates whether the matrix should contain a first column for subset coding.
names
Character. Indicates the column names (optional).

Value

  • A data.frame object.

See Also

rav, pargen, datgen, rAverage-package

Examples

Run this code
rav.grid(lev=c(3,2,3), trials=5, names=c("Hk","Fa","Mg"))

Run the code above in your browser using DataLab