powered by
Function to find the number and percentages of categories
represent_categorical_data_exclude_missing(data, variable, nrcode = NA)
number and percentages or error if failure
a data frame
the column name
non response code
this.df <- data.frame(c(11, 78), c("m", "f"), stringsAsFactors = FALSE) colnames(this.df) <- c("mark", "gender") represent_categorical_data_exclude_missing(this.df, "gender", NA)
Run the code above in your browser using DataLab