# The minimalExample contains $n$ of 20 participants categorized according
# to two factors $f = 2$, namely `Intensity` (three levels)
# and Pitch (two levels) for 6 possible cells.
minimalExample
# Lets incorporate the data in an anofa data structure
w <- anofa( Frequency ~ Intensity * Pitch, minimalExample )
# The data presented using various formats looks like
toWide(w)
# ... has 20 lines ($n$) and 2 columns ($f$)
toLong(w)
# ... has 40 lines ($n \times f$) and 3 columns (participant's `Id`, `Factor` name and `Level`)
toRaw(w)
# ... has 20 lines ($n$) and 5 columns ($2+3$)
toCompiled(w)
# ... has 6 lines ($2 \times 3$) and 3 columns ($f$ + 1)
toTabular(w)
# ... has one table with $2 \times 3$ cells. If there had been
# more than two factors, the additional factor(s) would be on distinct layers.
Run the code above in your browser using DataLab