freq {funModeling} | R Documentation |
Frequency table for categorical variables
Description
Retrieves the frequency and percentage for input
Usage
freq(data, input = NA, plot = TRUE, na.rm = FALSE, path_out)
Arguments
data |
input data containing the variable to describe |
input |
string input variable (if empty, it runs for all numeric variable), it can take a single character value or a character vector. |
plot |
flag indicating if the plot is desired, TRUE by default |
na.rm |
flag indicating if NA values must be included in the analysis, FALSE by default |
path_out |
path directory, if it has a value the plot is saved |
Value
vector with the values scaled into the 0 to 1 range
Examples
freq(data=heart_disease$thal)
freq(data=heart_disease, input = c('thal','chest_pain'))
[Package funModeling version 1.9.5 Index]