The data viewer/preview window on RStudio does not display NA values in list-columns the same way as it does when NA values are present in traditional atomic vector columns.
The following code should show the issue:
Note: this is written to work exclusively in base, but I added lines to convert the dataframe to a tibble, which does not solve the issues.
x <- c(1, NA, 3) df <- as.data.frame(x) df$x_list <- list(df$x) df$x_list[] <- NA # libary(dplyr) # df <- as_tibble(df) View(df)
When you are switched to the viewer (I assume the view command will do this automatically, but if not, please view the dataframe "df" using the standard RStudio viewer preview), the NA values in all 3 rows of the x_list column display without being italicized, as opposed to the NA in the x column which is italicized. This should be standardized lest R users think coercion or some other cleaning problem has gone wrong in list columns!