Thanks. I understand. But my problem is not placing the code in ~/.Rprofile. It is already there and I have restarted RStudio. My problem is that the error persists.
According to the RStudio
ppl a fix is on the way. Please have a look here for any additional fixes that may apply to your case:
I might add that it is quite ok to run the regular R Console
, i.e., the R
application in OS X, in the meantime.
What happens when you type this
cl <- parallel::makeCluster(2, setup_strategy = "sequential")
EDIT: Added the above two lines
I was not aware that this might be an RStudio-specific problem. That helps. Will also pay attention to possible upcoming fix. I just tried entering:
parallel:::setDefaultClusterOptions(setup_strategy = “sequential”)
in the RStudio command line upon restart and the code ran. Too bad I don’t really know what I did here, but this is progress. Thank you.
Since it ran it means that the fix, i.e., entering those lines in ~/.Rprofile
should work! :)
- Have you put it in your home directory?
- Have you named the file
.Rprofile
?
2.1 If you typecd
in the Terminal (on OS X), and then typels -a
what do you see? - Is the text in that file exactly as the one I pasted above?
3.1 What do you get when writing this in the terminalcat ~/.Rprofile
Answering your questions:
- Yes
- Yes
2.1. I see a list of files that does include .Rprofile - Yes
3.1. I get the following. But please note that I commented out the lines of code just before giving the ‘parallel:::setDefaultClusterOptions…’ command on the R prompt. Just to be sure that I wasn’t giving the same command twice in different places.
WORKAROUND: https://github.com/rstudio/rstudio/issues/6692
Revert to ‘sequential’ setup of PSOCK cluster in RStudio Console on macOS and R 4.0.0
#if (Sys.getenv(“RSTUDIO”) == “1” && !nzchar(Sys.getenv(“RSTUDIO_TERM”)) &&
Sys.info()[“sysname”] == “Darwin”) {
parallel:::setDefaultClusterOptions(setup_strategy = “sequential”)
#}
the format of my answer to 3.1 got all mangled by the editor here. Sorry.
Start with three back ticks ` and end it with three back ticks `.