Skip to content

Running R from CD?

5 messages · bogdan romocea, Jari Oksanen, John Fox +1 more

#
Better install and run R from a USB flash drive. This will save you
the trouble of re-writing the CD as you upgrade and install new
packages. Also, you can simply copy the R installation on your work
computer (no install rights needed); R will run.

HTH,
b.


From: Hans van Walen <hans_at_vanwalen.com>
Date: Fri 27 Aug 2004 - 23:54:53 EST


At work I have no permission to install R. So, would anyone know
whether it is possible to create a CD with a running R-installation
for a windows(XP) pc? And of course, how to?

Thank you for your help,
Hans van Walen
#
On Mon, 2004-11-22 at 02:41, bogdan romocea wrote:
I think there is a niche (= a hole in the wall) for a live CD: it is
cheaper to distribute 20 copies of CD's to your audience than 20 USB
memory sticks. Instructions would be welcome.
Check the file Getting-Started-with-the-Rcmdr.pdf in John Fox's Rcmdr
package. You should be able to reach this package by launching
help.start(), and then browsing its directory in the help browser
window. Go to chapter "7. Some Suggestions for Instructors" which tells
you how to make a live CD of R in Windows. I haven't tried this, since I
don't have Windows, but I sure will when I got to be an "instructor" in
a Windows class.
 
cheers, jari oksanen
#
Dear Jari,

When I distribute an R Windows CD/ROM to students, I generally include both
the installer and an installed version. This allows students who don't want
to or can't install the software to use it. They pay a big penalty in speed,
however. A flash drive would provide better performance if this is a viable
option.

It's not really necessary to do anything as elaborate as in my Rcmdr
instructions if the CD is for one's own use: Just install to the CD (copy
over installed versions of whatever contributed packages you want to use)
and run rgui.exe from it.

Regards,
 John

--------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox 
--------------------------------
#
Let's be a little careful here.  An R for Windows installation is 
relocatable, so you can just install it into a temporary directory and 
burn a copy of that onto CD.  (That may not be true after installing 
packages into a non-default library.)  It is not true of a Unix or MacOS X 
installation, as far as I am aware, for they have absolute paths coded 
into the files.

However, an R session does need to be able to write to a temporary 
directory, and also needs a `home' directory and at a last resort the 
latter defaults to the current directory.  So you do need to be running on 
a machine on which you have a writable area.

A policy that says you cannot install a program, but you can run from a CD 
and you can let such a program write to your area seems full of holes to 
me.  (Ours does not allow low-privilege users to run programs from a CD.)
Also, many organizations ban the use of USB drives for security reasons.

BTW, I believe running R 2.0.x from a CD will be a lot slower than 1.9.1
because of lazy loading and frequent file accesses: that's a theoretical 
issue we intend to address for 2.1.0, but not one anyone has yet commented 
that it is a problem.
On Mon, 22 Nov 2004, Jari Oksanen wrote:

            

  
    
2 days later
#
On Mon, 22 Nov 2004, Prof Brian Ripley wrote:
[...]
I collected some data (under Windows XP).

On a modern desktop, running R from a CD-R or from a USB 2.0 thumbdrive 
was perfectably acceptable, with startup times of about 5 secs and little 
delay when running.

On a 2.5year old laptop with a USB 1.1 port (but the same thumbdrive) it 
took about 15secs to start and with frequent delays the first time an 
object was used -- I would not find that tolerable.  The laptop's CD drive 
was slower than the desktop and there were delays when it powered down, 
but it was acceptable.

This was less performance penalty than I was expecting, and less than I 
have seen on a high-latency network file system. So it looks as if all we 
can do is trade a slower startup time (by caching files) for removing 
hiatuses when running.  (Caching the pkg.rdb and pkg.rdx files when a 
package is opened would probably only take up a little over 1Mb in a 
typical session.)

Writing to the thumbdrive took about 20mins, as R has so many small files
and the drive has a VFAT file system.