Skip to contents

Pivot data frame to long format for easy printing

Usage

display_long(df, cols = dplyr::everything())

Arguments

df

<data.frame> or <tibble> to pivot long

cols

<character> vector of columns to pivot long, default is dplyr::everything()

Value

a <data.frame> or <tibble> in long format

Examples

dplyr::tibble(
   int = 1:10,
   chr = letters[1:10],
   date = rep(Sys.Date()), nrow(int)) |>
display_long()
#> # A tibble: 30 × 2
#>    name  value     
#>    <chr> <chr>     
#>  1 int   1         
#>  2 chr   a         
#>  3 date  2024-10-15
#>  4 int   2         
#>  5 chr   b         
#>  6 date  2024-10-15
#>  7 int   3         
#>  8 chr   c         
#>  9 date  2024-10-15
#> 10 int   4         
#> # ℹ 20 more rows