powered by
Frequency statistics of elements in a vector
txt_freq(x, exclude = c(NA, NaN), order = TRUE)
a vector
logical indicating to exclude values from the table. Defaults to NA and NaN.
logical indicating to order the resulting dataset in order of frequency. Defaults to TRUE.
a data.frame with columns key, freq and freq_pct indicating the how many times each value in the vector x is occurring
x
# NOT RUN { x <- sample(LETTERS, 1000, replace = TRUE) txt_freq(x) x <- factor(x, levels = LETTERS) txt_freq(x, order = FALSE) # }
Run the code above in your browser using DataLab