I've created a dataframe (tibble) from a nested list and I'm perplexed by the RStudio View of the list-column.
Here's an example of what I mean:
df <- structure(list(dimension_name = c("KAZALNIK", "OBMOČJA","LETO"),
levels = list(structure(list(values = "1", valueTexts = "Delež vzorcev"),
class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA, -1L)), structure(list(
values = c("1", "2", "3"), valueTexts = c("Mala", "Srednja", "Velika")),
class = c("tbl_df","tbl", "data.frame"), row.names = c(NA, -3L)), structure(list(
values = c("2012", "2013", "2014", "2015"), valueTexts = c("12","13", "14", "15")),
class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA, -4L)))), class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA, -3L))
the second column are all nested dataframes (tibbles) with two columns.
Yet in the RStudio View I see this:
If I look at str(df)
I cannot see anything different about the third row - or third element of the listcolumn, and I'm going crazy
str(df)
tibble [3 x 2] (S3: tbl_df/tbl/data.frame)
$ dimension_name: chr [1:3] "KAZALNIK" "OBMOČJA" "LETO"
$ levels :List of 3
..$ : tibble [1 x 2] (S3: tbl_df/tbl/data.frame)
.. ..$ values : chr "1"
.. ..$ valueTexts: chr "Delež vzorcev"
..$ : tibble [3 x 2] (S3: tbl_df/tbl/data.frame)
.. ..$ values : chr [1:3] "1" "2" "3"
.. ..$ valueTexts: chr [1:3] "Mala" "Srednja" "Velika"
..$ : tibble [4 x 2] (S3: tbl_df/tbl/data.frame)
.. ..$ values : chr [1:4] "2012" "2013" "2014" "2015"
.. ..$ valueTexts: chr [1:4] "12" "13" "14" "15"
I would expect all three rows to read "2 variables".
Granted, the object performs as expected, it's just that I don't understand why the IDE is acting the way it is and am worried I am missing something.
Edit2: I'm using RStudio 2022.07.0 Build 540 Spotted Wakerobin Preview (64285800, 2022-06-23)
(Edit1: to make the example data more clear)