powered by
The formula method reshapes the data set from long to wide format and calls the default method.
# S3 method for formula twoway(formula, data, subset, na.action, ...)
A formula of the form response ~ rowvar + colvar, where response is numeric
response ~ rowvar + colvar
response
The name of the data set, containing a row vector, column factor and a numeric response
An expression to subset the data (unused)
What to do with NAs? (unused)
other arguments, passed down
Michael Friendly and Richard Heiberger
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
longRT <- to_long(taskRT) twoway(RT ~ Task + Topic, data=longRT)
Run the code above in your browser using DataLab