I have a several categorical variables with values from 1-3. I would like to create a table similar to those generated by the tabm feature in Stata which shows me the number of observations for each categorical variable.
In Stata, I would simply write:
tabm Variable1 Variable2 Variable3
This is how the table should look (obs=observations):
Value=1 Value=2 Value=3
Variable1 5 obs 10 obs 12 obs
Variable2 2 obs 9 obs 0 obs
Variable3 12 obs 9 obs 3 obs
I read some posts about Cross.Table but my version of R won't accept gmodels (R Version 3.4.4).