twoway.formula {twoway}R Documentation

Formula method for twoway analysis using a dataset in long format

Description

The formula method reshapes the data set from long to wide format and calls the default method.

Usage

## S3 method for class 'formula'
twoway(formula, data, subset, na.action, ...)

Arguments

formula

A formula of the form response ~ rowvar + colvar, where response is numeric

data

The name of the data set, containing a row vector, column factor and a numeric response

subset

An expression to subset the data (unused)

na.action

What to do with NAs? (unused)

...

other arguments, passed down

Author(s)

Michael Friendly and Richard Heiberger

References

the conversion of long to wide in a formula method was suggested on https://stackoverflow.com/questions/50469320/how-to-write-a-formula-method-that-converts-long-to-wide

Examples

longRT <- to_long(taskRT)
twoway(RT ~ Task + Topic, data=longRT)

[Package twoway version 0.6.3 Index]