The sysop for the virtual desktops at my university insists on installing R and RStudio to support both 32 and 64 bit R, despite the fact that the whole cluster is running only 64-bit Windows 10. The consequence is that when I have to update a package from source, I have to build both 32 and 64 bit versions. Further, if there is a 32 bit dependency that isn't installed (such as Java), update of both versions fails. I know that I can append "INSTALL_opts=c("--no-multiarch") to the update.packages() and install.packages() calls, and I suppose that I could create a personal version of update.packages() to include this option, but there is probably a way that I could set a startup default to set this option automatically. But I haven't been able to find the magic to do this.
Thanks to anyone that can tell me if and how such a start-up option can be set.
Set the option on your startup files (Rprofile.site
or .Rprofile
).
I don't know how the R INSTALL command works. Entering:
options(INSTALL_opts = c("--no-multiarch"))
install.packages("SqlRender)
doesn't work, while executing:
install.packages("SqlRender", INSTALL_opts=c("--no-multiarch"))
does work. What do I have to put into my .rprofile to get install.packages to include this option for every invocation?
You are right for some reason setting the option globally is not considered a good idea, here is a work around if interested.
OK. Based on andresrcs's suggestion, I put the following line into the .rprofile of the working directory of my "base" project where I do all my package maintenance:
install.packages <- function(pkgs) utils::install.packages(pkgs, INSTALL_opts = '--no-multiarch')
This in essence replaces the native install.packages() with a personal version that includes the "--no-multiarch' option. It works for initial packages installs, and since update.packages ultimately calls install.packages(), it works for update.packages() as well. So I can finally get rid of the 32 bit versions that I never use.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.