Brms/rstan on R 4.0

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! :)

  1. Have you put it in your home directory?
  2. Have you named the file .Rprofile?
    2.1 If you type cd in the Terminal (on OS X), and then type ls -a what do you see?
  3. Is the text in that file exactly as the one I pasted above?
    3.1 What do you get when writing this in the terminal cat ~/.Rprofile

Answering your questions:

  1. Yes
  2. Yes
    2.1. I see a list of files that does include .Rprofile
  3. 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 `.