twoway (version 0.6.2)

twoway.formula: 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 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

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

Run this code
# NOT RUN {
longRT <- to_long(taskRT)
twoway(RT ~ Task + Topic, data=longRT)
# }

Run the code above in your browser using DataCamp Workspace