R/freq_out.R

Defines functions freq_out

Documented in freq_out

#' Make a frequency table for a factor
#'
#' Create a data.frame showing the frequency of levels in a given factor
#'
#' @param x A factor
#'
#' @return tbl_df
#' @export
#' @examples
#' freq_out(iris$Species)
freq_out <- function(x) {
    xdf <- dplyr::data_frame(x)
    dplyr::count(xdf, x)
}
samhinshaw/guelph documentation built on May 25, 2017, 11:40 p.m.