Skip to contents

Pivot data frame to long format for easy printing

Usage

display_long(data)

Arguments

data

<data.frame>

Value

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

Examples

(x <- dplyr::tibble(int = c(1:9, NA_integer_), chr = letters[1:10], date = Sys.Date()))
#> # A tibble: 10 × 3
#>      int chr   date      
#>    <int> <chr> <date>    
#>  1     1 a     2024-12-25
#>  2     2 b     2024-12-25
#>  3     3 c     2024-12-25
#>  4     4 d     2024-12-25
#>  5     5 e     2024-12-25
#>  6     6 f     2024-12-25
#>  7     7 g     2024-12-25
#>  8     8 h     2024-12-25
#>  9     9 i     2024-12-25
#> 10    NA j     2024-12-25

display_long(x)
#> # A tibble: 30 × 2
#>    name  value     
#>    <chr> <chr>     
#>  1 int   1         
#>  2 chr   a         
#>  3 date  2024-12-25
#>  4 int   2         
#>  5 chr   b         
#>  6 date  2024-12-25
#>  7 int   3         
#>  8 chr   c         
#>  9 date  2024-12-25
#> 10 int   4         
#> # ℹ 20 more rows