R/utils-tabyl.R

Defines functions tabyl

# inspired by janitor::tabyl(),
# to skip the dependency

tabyl <- function(x) {
  dataframe <- tibble::tibble(x = x) %>%
    dplyr::count(x) %>%
    dplyr::mutate(percent = n / sum(n))
  colnames(dataframe) <- c(".", "n", "percent")
  dataframe
}
EMODnet/EMODnetWFS documentation built on June 14, 2025, 2:16 p.m.