user4618
user4618

Reputation: 121

How to automatically update R to the latest patched version?

Is there any way to automatically update R on Mac OS X to the latest patched version (R-Patched) on a daily basis or some predetermined intervals?

Upvotes: 2

Views: 1262

Answers (2)

kmm
kmm

Reputation: 6310

I have a bash script that installs the daily patched build from http://r.research.att.com. Installed libraries remain untouched, except for those in core.

I update manually, but you could set up a cron job as @bnaul suggests. I'm not sure how it will handle the need for sudo'ing, however. You might have to move your R out of /Library/Frameworks and then change the script accordingly.

#!/bin/bash
curl -s http://r.research.att.com/R-2.13-branch-leopard-universal.tar.gz | sudo tar fvxz - -C /

Upvotes: 0

bnaul
bnaul

Reputation: 17636

My impression is that compiling from source is the most (only?) reliable way to get the most recent patched version, but I could be wrong about this. A simple shell script to download the latest patched version and recompile would be:

curl -o /tmp/R-patched.tar.gz ftp://ftp.stat.math.ethz.ch/Software/R/R-patched.tar.gz
tar xzvf /tmp/R-patched.tar.gz
cd /tmp/R-patched
./configure
make
cp bin/R <old_R_binary_location>

You could then use crontab to run this at regular intervals. I don't find the crontab man page to be very helpful, so I always end up referring back to guides such as this one.

Upvotes: 4

Related Questions