Learn R Programming

infoDecompuTE (version 0.6.2)

adjustEffectNames: Adjust the Effects' Names

Description

Adjust for appropriate syntax describing the effects matching the structural formula.

Usage

adjustEffectNames(effectsMatrix, effectNames)

Arguments

effectsMatrix

a matrix of variables by terms showing which variables appear in which terms generated by the terms.

effectNames

a vector of character containing the labels of the treatment or block terms in the model generated by the terms.

Value

A vector of character containing the labels of the terms in the model with appropriate syntax describing the effects.

Examples

Run this code
# NOT RUN {
str.for = "A*(B/E/C)*D"
effectsMatrix= attr(terms(as.formula(paste("~", str.for)), keep.order = TRUE) , "factors")
effectNames =  attr(terms(as.formula(paste("~", str.for)), keep.order = TRUE) , "term.labels")

adjustEffectNames(effectsMatrix, effectNames) 

# }

Run the code above in your browser using DataLab