is.formula {ANOFA}R Documentation

logical functions for formulas

Description

The functions is.formula(), is.one.sided(), has.nested.terms(), has.cbind.terms(), in.formula() and sub.formulas() performs checks or extract sub-formulas from a given formula.

Usage

is.formula(frm)

is.one.sided(frm)

has.nested.terms(frm)

has.cbind.terms(frm)

in.formula(frm, whatsym)

sub.formulas(frm, head)

Arguments

frm

a formula;

whatsym

a symbol to search in the formula;

head

the beginning of a sub-formula to extract

Details

These formulas are for internal use.

Value

is.formula(frm), has.nested.terms(frm), and has.cbind.terms(frm) returns TRUE if frm is a formula, contains a '|' or a 'cbind' respectively; in.formula(frm, whatsym) returns TRUE if the symbol whatsym is somewhere in 'frm'; sub.formulas(frm, head) returns a list of all the sub-formulas which contains head.

Examples

is.formula( Frequency ~ Intensity * Pitch )
 
has.nested.terms( Level ~ Factor | Level )
 
has.cbind.terms( Frequency ~ cbind(Low,Medium,High) * cbind(Soft, Hard) )
 
in.formula( Frequency ~ Intensity * Pitch, "Pitch" )
 
sub.formulas( Frequency ~ cbind(Low,Medium,High) * cbind(Soft, Hard), "cbind" )
 



[Package ANOFA version 0.1.3 Index]