tables / frequencies in R

At my previous internship, SAS was the software of choice for about 80% of the statistical work done; this rate was pulled down by me using/pushing for R and another co-worker using/pushing for Python.

One of the positive features of SAS is its PROC FREQ command. It gives useful summaries for contingency tables, such as row and column summary statistics and tests of different types. R‘s base function table is not full of bells and whistles. To get similar statistics as SAS’s PROC FREQ, check out CrossTable from the gmodels package or the base function margin.table to get row/column totals. See this for examples.

About Vinh Nguyen

Statistician

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>