R/new_tidytable.R

Defines functions new_tidytable

Documented in new_tidytable

#' Create a tidytable from a list
#'
#' @description
#' Create a tidytable from a list
#'
#' @param x A named list of equal-length vectors. The lengths are not checked; it is the responsibility
#'   of the caller to make sure they are equal.
#'
#' @export
#'
#' @examples
#' l <- list(x = 1:3, y = c("a", "a", "b"))
#'
#' new_tidytable(l)
new_tidytable <- function(x = list()) {
  new_data_frame(x, class = c("tidytable", "tbl", "data.table"))
}

Try the tidytable package in your browser

Any scripts or data that you put into this service are public.

tidytable documentation built on Sept. 11, 2024, 8:05 p.m.