I am used to working with nested columns whose each row looks like <tibble [1 x 1]>
However, a function produced the list column with each row of the following format:
<tibble[,1] [1 × 1]>
. How should I interpret the structure of such list columns and how can I turn the latter format to a format that is similar to <tibble [1 x 1]>
?
reprex:
Local .Rprofile
detected at /lustre/scratch123/hgi/mdt1/teams/martin/tl11/elgh_prs/.Rprofile
library(tibble)
#> Warning: package 'tibble' was built under R version 3.6.3
library(purrr)
library(dplyr)
#> Warning: replacing previous import 'vctrs::data_frame' by 'tibble::data_frame'
#> when loading 'dplyr'
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
mutate(tibble(a=1),b = map(a, ~ tibble(c=1)))
#> # A tibble: 1 x 2
#> a b
#> <dbl> <list>
#> 1 1 <tibble[,1] [1 × 1]>
Created on 2021-04-20 by the reprex package (v2.0.0)
Session info
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 3.6.1 (2019-07-05)
#> os Ubuntu 18.04.5 LTS
#> system x86_64, linux-gnu
#> ui X11
#> language (EN)
#> collate en_GB.utf8
#> ctype en_GB.utf8
#> tz Europe/London
#> date 2021-04-20
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date lib source
#> backports 1.1.4 2019-04-10 [2] CRAN (R 3.6.0)
#> cli 2.4.0 2021-04-05 [1] CRAN (R 3.6.3)
#> conflicted 1.0.4 2019-06-21 [1] CRAN (R 3.6.1)
#> crayon 1.4.1 2021-02-08 [1] CRAN (R 3.6.1)
#> digest 0.6.27 2020-10-24 [1] CRAN (R 3.6.1)
#> dplyr * 1.0.0 2020-05-29 [1] CRAN (R 3.6.1)
#> ellipsis 0.3.1 2020-05-15 [1] CRAN (R 3.6.1)
#> evaluate 0.14 2019-05-28 [2] CRAN (R 3.6.3)
#> fansi 0.4.2 2021-01-15 [1] CRAN (R 3.6.1)
#> fs 1.5.0 2020-07-31 [1] CRAN (R 3.6.1)
#> generics 0.0.2 2018-11-29 [1] CRAN (R 3.6.1)
#> glue 1.4.2 2020-08-27 [1] CRAN (R 3.6.1)
#> highr 0.8 2019-03-20 [1] CRAN (R 3.6.1)
#> htmltools 0.5.1.1 2021-01-22 [1] CRAN (R 3.6.1)
#> knitr 1.31 2021-01-27 [1] CRAN (R 3.6.1)
#> lifecycle 1.0.0 2021-02-15 [1] CRAN (R 3.6.3)
#> magrittr 2.0.1 2020-11-17 [1] CRAN (R 3.6.1)
#> pillar 1.6.0 2021-04-13 [1] CRAN (R 3.6.3)
#> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 3.6.1)
#> ps 1.6.0 2021-02-28 [1] CRAN (R 3.6.3)
#> purrr * 0.3.4 2020-04-17 [1] CRAN (R 3.6.1)
#> R6 2.5.0 2020-10-28 [1] CRAN (R 3.6.1)
#> reprex 2.0.0 2021-04-02 [1] CRAN (R 3.6.1)
#> rlang 0.4.10 2020-12-30 [1] CRAN (R 3.6.1)
#> rmarkdown 2.6.6 2021-02-12 [1] Github (rstudio/rmarkdown@a62cb20)
#> rstudioapi 0.11 2020-02-07 [1] CRAN (R 3.6.1)
#> sessioninfo 1.1.1 2018-11-05 [2] CRAN (R 3.6.3)
#> stringi 1.5.3 2020-09-09 [1] CRAN (R 3.6.1)
#> stringr 1.4.0 2019-02-10 [1] CRAN (R 3.6.1)
#> styler 1.3.2 2020-02-23 [1] CRAN (R 3.6.1)
#> tibble * 3.1.0 2021-02-25 [1] CRAN (R 3.6.3)
#> tidyselect 1.1.0 2020-05-11 [1] CRAN (R 3.6.1)
#> utf8 1.2.1 2021-03-12 [1] CRAN (R 3.6.3)
#> vctrs 0.3.7 2021-03-29 [1] CRAN (R 3.6.3)
#> withr 2.4.1 2021-01-26 [1] CRAN (R 3.6.1)
#> xfun 0.21 2021-02-10 [1] CRAN (R 3.6.1)
#> yaml 2.2.1 2020-02-01 [2] CRAN (R 3.6.3)
#>
#> [1] /nfs/users/nfs_t/tl11/R/x86_64-conda_cos6-linux-gnu-library/3.6
#> [2] /lustre/scratch119/realdata/mdt2/teams/martin/users/tl11/conda_env/renv_renv/lib/R/library