0

I kept getting the ``maximal number of DLLs reached...` error, but the solution here didn't work for me from command line(this is OS dependent, I'm on Linux). Read on to see how I increased DLLs from within R.

kana
  • 605
  • 7
  • 12

1 Answers1

1

I was looking around, and most solutions are very manual. I liked the editing method here We can fix this from inside R:

install.packages("usethis")
usethis::edit_r_environ()

This will open up an editor for a newly created .Renviron file, where we write in:

R_MAX_NUM_DLLS=256

If you need more than this, you can increase it based on operating system

What this is doing is creating an .Renviron file in your home directory, and creating the R_MAX_NUM_DLLS environment variable, which will be 256 at this point. We can now load up to 256 rather than the default 100.

kana
  • 605
  • 7
  • 12
  • The answer is correct, but `usethis` is a distraction. All you need is the `key=value` assignment in an `~/.Renviron` file (or one its alternatives). Easiest done with an editor. – Dirk Eddelbuettel Apr 09 '18 at 19:49
  • Morever, what you suggest here [is already said over there](https://stackoverflow.com/a/43689526/143305) in several of the answers, so I will close this as duplicate. – Dirk Eddelbuettel Apr 09 '18 at 19:51
  • 1
    This was for editing the R environment from Rstudio, rather than having to go to command line – kana Apr 14 '18 at 01:37