R/create_tidytuesday_dictionary.R

Defines functions create_tt_dict

Documented in create_tt_dict

#' Create the TidyTuesday data dictionary
#' @param x an in memory data.frame or tibble.
#' @importFrom dplyr mutate
#' @importFrom tibble tibble
#' @importFrom knitr kable
#' @export

create_tt_dict <- function(x) {
    tibble::tibble(variable = names(x)) %>%
        dplyr::mutate(
            class = purrr::map(x, typeof),
            description = variable
        ) %>%
        knitr::kable()
}
jthomasmock/tidytuesdaymeta documentation built on Dec. 15, 2022, 3:17 p.m.