![]() “Current” is what your system (and RStudio) is seeing by default. You should see one directory for each of the X.Y versions of R you’ve installed, along with a “Current” directory which is just a symlink to the most recently installed version. (You can open up a finder window, press CMD+ shift+ g and search for it directly instead of manually navigating) Library/Frameworks/R.framework/Versions/ Parallel versions and their locationīut wait, where’d the old version go? If you carried out your installation with the default values, take a look in this directory: If you momentarily open RStudio, you should see that it prints out the new version!Īside: if you want to know why this works, check out the “Uninstalling under MacOS” and “Multiple versions” headings of the R Installation and Administration document or the RSwitch - Guide page. ![]() ![]() Once you carry out your pkgutil trickery, you can go ahead and download the *.pkg of the R version you want to install and install it like you normally would. Sudo pkgutil -forget .el-capitan.fw.pkg \ Executing the following in Terminal will make your system ignore the already installed R versions, leaving the original framework in place while installation of the new version is carried out. Instead, what we can do prior to installing the new version of R is trick OSX into forgetting that R is already installed on your system by using pkgutil. If that happens it ruins the whole point of going through this exercise. ![]() Installationīut how do we go through the process of installing different versions of R to begin with? If we were to just blindly use the binary installer (*.pkg) version available through CRAN here, the installer will remove the current version of the r framework (including your package libraries). As far as RStudio is concerned, there are no concerns, we just have to make sure it’s updated. When you install a “new” (can be older/depreciated) version of R, part of the install process is updating that symbolic link. That is the location/path/alias of the binary that will be executed when you open up RStudio. Go ahead and open up an instance of Terminal and see what: which r returns. Since I went through the hour or two figuring out how to do it, let me save you the effort… RStudio Sounds reasonable right? It also sounds like there should be a dummies-guide for doing this right? Not the case there were a ton of resources which takes you halfway through the process, but not all the way. v3.4, v3.5, v3.6)ģ) switch easily between the different versionsĤ) keep each version’s package libraries separate and independent from one anotherĥ) have, or enable, an easy/quick way to install my “most vital” packages for the newer versions. Well, my current role doesn’t give me that luxury and so I had to find a way to let me properly develop my project while meeting a number of requirements:Ģ) installing multiple versions of R (e.g. My thinking is that it works now, why take the risk of messing it up and giving myself the headache? and lastly, (at face value) it’s not possible/easy to switch between versions of R even if you manage to get two or more of them installed.įor these reasons and more, I personally tend to resist updating both R versions and package versions. ![]() installing a new (or old) version of R via binary (*.pkg) runs the significant risk of wiping out your current r library.(ideally) a developer should keep in mind that thier users may not have the latest and greatest installation, and may be hesitant to change things on thier local install just to try out a piece of software.some of the new packages I want to leverage within my own project require a more recent R version.many of the packages I had been using are out of date (who has time to keep them updated?).Through this effort I’ve encountered a couple of versioning-related challenges including but not limited to: Please make sure to backup your computer or use TimeMachine prior to giving this a try! Motivation & SetupĪ large portion of my current responsibilities focus on the development and deployment of a new R package. Given all of the varieties of mac OS X, and the innumerable ways of installing and maintaining R I can’t guarantee that the outline below will work for your precise situation. I’m not a computer scientist nor did I sleep at a Holiday Inn last night. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |