When I execute the code
df <- data.frame(x = c(1, 2, 3), y = c(4, 5, 6))
attr(df, "variable.labels") <- c(x = "This is x", y = "This is y")
View(df)
I see attributes of "variable.labels" under column names in the View() function on RStudio 2022.07.4+587 "Spotted Wakerobin", RStudio 2022.12.1+366 "Elsbeth Geranium" & RStudio 2023.03.3+547 "Cherry Blossom".
However, with version RStudio 2023.06.3+581 "Mountain Hydrangea" and later (include the last RStudio 2024.04.0-daily+426 "Chocolate Cosmos") there is no display attributes of "variable.labels".
There is a similar problem with displaying attributes of "variable.labels" with these versions for Server Solutions, for example, on https://posit.cloud/