Learn R Programming

adas.utils (version 1.0.0)

fp_add_names: Add factor names to a design matrix

Description

Store factor names in the factorial.plan object, as a list within the factor.names attribute.

Usage

fp_add_names(dm, ...)

Value

the design matrix with the named factors.

Arguments

dm

the design matrix.

...

a set of factors to name, with their respective names, e.g. A="Temperature", B="Pressure". If the factor is not in the design matrix factors list, a warning is printed and the factor is skipped.

Examples

Run this code
fp_design_matrix(3, rep=2) %>%
  fp_add_names(A="Temperature", B="Pressure")

Run the code above in your browser using DataLab