freqTab | R Documentation |
Create a frequency table of unique values in a data column.
freqTab(df,var,maxvals,noties)
df |
This is the dataframe you want to use |
var |
This is the variable you want to look at the frequency of |
maxvals |
This is the maximum number of unique values you want to return (useful if there are dozens or hundreds of unique values in a column). If maxvals = n, and there is a tie for the number of observations in the nth largest unique value, then both values will be returned. |
noties |
This states whether the function should return exactly N rows or all of the values in the top N rankings (i.e., includes possibility of multiple rows that are tied for Nth place). |
A frequency table listing the number of instances each unique value is in a data column, along with each value's percentage of the total.
Andrew J. Van Leuven, vanleuven.3@osu.edu
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.