R/view-list.R

Defines functions view_list

Documented in view_list

#' Compact view of list values
#' @return Returns a data frame to display a list or vector vertically.
#' @param x a vector or list to be transposed
#' @export
#' @seealso [compare_values()]
#' @examples
#' compare_values(10, 8) |>
#'   view_list()
#'
#' add_article(c(1,8,10, 11, 18)) |>
#'   view_list()
view_list <- function(x) {
  data.frame(
    value = unlist(x)
  )
}

Try the headliner package in your browser

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

headliner documentation built on Dec. 28, 2022, 2:47 a.m.