View(data.frame) does not work on my Mac OS X 11.6 and the latest version of RStudio (2021.09.0+351 "Ghost Orchid" Release (077589bcad3467ae79f318afe8641a1899a51606, 2021-09-20) for macOS
But the incredible thing (and it's driving me crazy) is that it does not work for only ONE Rproj. I have tried to delete the Rproj file and create the project again... it didn't work; delete all source code, re-clone the repo, create a new Rproject for the new downloaded repo... and View() still does not work.
Again, it is working as usual for any other Rproj, but not for this particular one. Everything else seems to be working fine. It fails only when I try to visualize a data frame. For example, given any data frame object (df), when clicking on the object in the "Environment" tap... Rstudio freezes. If I type View(df)... it freezes, and if I type utils::View(df)
Yes, I was referring to the utils::View() function, that I think it is the one that Rstudio uses by default when clicking to the objects in the "Environment" panel.
With respect to @jrkrideau question, here is the .Rproj
This suggests that you probably allow your global workspace to persist from one R session to the next, in this project. And that is a good bet for where the inexplicable fatal weirdness lies.
I can't guarantee it will solve your particular problem, but cleaning out the global workspace would be worth trying. And adopting as a lifestyle.
This slide shows how to change your RStudio global settings to live this way, i.e. never allow the global workspace to "leak" from one R session and the next:
usethis::use_blank_slate() will also do this setup for you.
None of the above worked for me. As I explained, I recloned the project, create a new brand project for it and still got the issue. I have to accept that View() does not work for this project. It is really confusing and annoying.
On the other hand, tibble::view(df) works, so I am afraid I will always have to type that command for this project instead of clicking on the data frame objects on the RStudio "Environment"
Same Problem here but for Tibbles. I can't view a pretty small tibble. R Studio remains idle and can't run any more code. I need to restart the entire session or force quit.