back to notes

crosstabs xtab base-R

base R, but I sadly went years without knowing about it."

The format is xtabs(~df$col1 + df$col2), which will return a frequency table with col1 as the rows and col2 as the columns.


last updated april 2018