-
Notifications
You must be signed in to change notification settings - Fork 3
RStudio: Using View() is very slow
In RStudio View(iris)
can be very slow - it can lock up RStudio for ~5-10s or more.
Run the following to find out your HOME directory:
$ echo $HOME
This returns /h/
- your Home drive on the network
If you run:
$ setx HOME $USERPROFILE
(in bash)
OR
> setx HOME "%USERPROFILE%"
(in CMD)
this sets HOME
to c:/Users/[username]
, and it appears to fix the problem - View(iris)
is now fast everywhere!
Caveat: It is likely that currently you have all of your dotfiles (.Rprofile, .Renviron, .gitconfig, .bashrc, etc.) in your H:/
(home network) drive because that is (has been) the HOME
directory. If you set HOME
to c:/Users/[username]
as above, you will need to move all of your dotfiles there.
If you find that the data viewer in RStudio is causing other problems—for instance truncating the number of columns in a large data set—you could try using utils::View(my_data)
instead.