posts by vikram

vbaliga.github.io

Sporadically updated, (somewhat) useful stuff.

vikram-baliga.com back to vikram-baliga.com

mailto:vbaliga@zoology.ubc.ca Email

github.com/vbaliga GitHub

@labrichthys Twitter

orcid.org/0000-0002-9367-8974 ORCID

vbaliga.github.io/feed.xml RSS feed



or click here for the archive



Set max DLLs in R (Windows)


On occasion, you may need adjust the max number of .dll files that R can handle. I first encountered this need when using a high number of packages together.

I’ve had trouble finding this info in the past, so I decided to create this post for others. This works if you are using Windows.

The following is machine-specific, so you will need to do this on each computer you run R.

In R:

user_renviron <- path.expand(file.path("~", ".Renviron"))
# check to see if the file already exists
# typically under: "C:/Users/YOURUSERNAME/Documents/.Renviron"
if(!file.exists(user_renviron)) 
  file.create(user_renviron)
file.edit(user_renviron) 

If file.edit(user_renviron) fails to work, just open the file itself (located wherever user_renviron is pointing) with a text editor.

Once you have the file open, edit or add the following line, save, and restart R:

R_MAX_NUM_DLLS=500

🐢

Written on April 22, 2019 by Vikram B. Baliga (vbaliga).