prop | R Documentation |
This function takes a dataframe and creates a table in percentages.
This is an enhanced version of prop.table
.
prop( df, vars, digit = 1, sort = NULL, head = NULL, print = TRUE, useNA = "ifany" )
df |
Input dataframe. |
vars |
Variables to be put into |
digit |
Digits under the decimal point to show. Defaults to 1. |
sort |
Whether to sort the table. Defaults to NULL. |
head |
Whether to restrict the table to the top few observations. Defaults to NULL. |
print |
Whether to only print the output, so that no quotes are seen
after applying |
useNA |
useNA which is an argument for |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.