The post Crosstab calculation in R appeared first on Data Science Tutorials
Crosstab calculation in R, To create a crosstab using functions from the dplyr and tidyr packages in R, use the following basic syntax. df %% group_by(var1, var2) %% tally() %__% spread(var1, n) The examples below demonstrate how to …