Over a million developers have joined DZone.

Using Old Versions of R Packages

DZone's Guide to

Using Old Versions of R Packages

· Big Data Zone
Free Resource

See how the beta release of Kubernetes on DC/OS 1.10 delivers the most robust platform for building & operating data-intensive, containerized apps. Register now for tech preview.

I received this email yesterday:

I have been using your ‘fore­cast’ pack­age for more than a year now. I was on R ver­sion 2.15 until last week, but I am hav­ing issues with lubri­date pack­age, hence decided to update R ver­sion to R 3.0.1. In our orga­ni­za­tion even get­ting an open source appli­ca­tion require us to go through a whole lot of approval processes. I asked for R 3.0.1, before I get approval for 3.0.1, a new ver­sion of R ( R 3.0.2 ) came out. Unfor­tu­nately for me fore­cast pack­age was built in R3.0.2. Is there any ver­sion of fore­cast pack­age that works in older ver­sion of R(3.0.1). I just don’t want to go through this entire approval war again within the orga­ni­za­tion.
Please help if you have any work around for this

This is unfor­tu­nately very com­mon. Many cor­po­rate IT envi­ron­ments lock down com­put­ers to such an extent that it crip­ples the use of mod­ern soft­ware like R which is con­tin­u­ously updated. It also affects uni­ver­si­ties (which should know bet­ter) and I am con­stantly try­ing to invent work-​​arounds to the con­straints that Monash IT ser­vices place on staff and stu­dent computers.

Here are a few thoughts that might help.

  1. Obvi­ously, edu­cat­ing the peo­ple who run the IT envi­ron­ment is the ideal solu­tion, but I’ve never had any suc­cess going that route.
  2. If you have to install old ver­sions of pack­ages, you can down­load them from the pack­age archives. For the fore­cast pack­age, go to cran​.​r​-project​.org/​s​r​c​/​c​o​n​t​r​i​b​/​A​r​c​h​i​v​e​/​f​o​r​e​cast/. How­ever, that is only going to help non-​​Windows users. For Win­dows, you need the binary zip file instead. Archives for all pre­vi­ous Win­dows ver­sions can be obtained from cran​.​r​-project​.org/​b​i​n​/​w​i​n​d​o​w​s​/​c​o​n​trib/.
  3. When my stu­dents run R in the stu­dent labs, I get them to first run the fol­low­ing script:

    lib <- .libPaths()

    That way, the stu­dents install the lat­est ver­sion of the fpp and depen­dent pack­ages (includ­ing fore­cast) to a writable sec­tion of their local drive. That drive is re-​​imaged every night, so they have to run this script every time they use R in the labs, but at least they get to use the lat­est ver­sion of the packages.

  4. Usu­ally, installing a pack­age that was built using a later ver­sion of R is not a prob­lem except when the under­ly­ing data stor­age struc­tures have changed. Using a pack­age that was built using R3.0.2 in R3.0.1 should not nor­mally cause issues as far as I know. I’m sure read­ers will cor­rect me on this if I’m wrong. (Think­ing of you Dirk!)
  5. How­ever, there is a prob­lem with using the fore­cast pack­age due to the way it links to the Rcp­pAr­madillo pack­age. I used a facil­ity only avail­able from R3.0.2 and so the binary ver­sion of the fore­cast pack­age for R3.0x may cause prob­lems when used with R3.0.0 or R3.0.1. (In fact, it may refuse to install.) The last ver­sion of the fore­cast pack­age that did not depend on R3.0.2 was v4.9 which can be down­loaded here. (It was built using R3.0.2 but it should run on R3.0.1 with­out a problem.)

New Mesosphere DC/OS 1.10: Production-proven reliability, security & scalability for fast-data, modern apps. Register now for a live demo.


Published at DZone with permission of Rob J Hyndman, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}