16.04.2014 Views

Embedding R in Windows applications, and executing R remotely

Embedding R in Windows applications, and executing R remotely

Embedding R in Windows applications, and executing R remotely

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Given the large, <strong>and</strong> grow<strong>in</strong>g, extent of packages of CRAN, it was only a matter of time before <strong>in</strong>dividual<br />

packages would be <strong>in</strong>tegrated <strong>in</strong>to Debian. This has happened over the course of the last year, see the<br />

Appendix for a current list of packages.<br />

The contribution of this paper is to outl<strong>in</strong>e the future direction of an <strong>in</strong>tegration of CRAN packages <strong>in</strong>to<br />

Debian – either directly with<strong>in</strong> Debian, or via an archive suitable for apt-get hostes on the CRAN mirrors.<br />

The setup describe here should also be suitable for an use with other code repositories (built on top of R)<br />

such as the BioConductor project.<br />

3 So even if we use R, why with Debian?<br />

Different users of Debian would probably give different answers to this question. However, non-users of<br />

Debian are often converg<strong>in</strong>g on a s<strong>in</strong>gle answer: the (real or perceived) difficulty of the Debian <strong>in</strong>stallation<br />

process. The next section discusses the <strong>in</strong>terplay between an easier <strong>in</strong>itial <strong>in</strong>stallation versus an easier longterm<br />

ma<strong>in</strong>tenance <strong>and</strong> upgrade path. Ideally, a comput<strong>in</strong>g platform such as a L<strong>in</strong>ux <strong>in</strong>stallation should excel<br />

<strong>in</strong> both aspects.<br />

In the context of R <strong>and</strong> Debian, it may also be worthwhile to po<strong>in</strong>t out that a significant portion of the<br />

<strong>in</strong>frastructure of the R Project, <strong>in</strong>clud<strong>in</strong>g the ma<strong>in</strong> CRAN host, is runn<strong>in</strong>g n Debian systems.<br />

3.1 Installation versus longer-term adm<strong>in</strong>istration<br />

It has been said that a large number of L<strong>in</strong>ux users get their first experiences by <strong>in</strong>stall<strong>in</strong>g a distribution<br />

with a strong focus of ease-of-use dur<strong>in</strong>g <strong>in</strong>stallation such as SuSE, M<strong>and</strong>rake, RedHat or others. Some<br />

of these users may experience, over the course of a few years <strong>and</strong> after some upgrade/re<strong>in</strong>stallation cycles,<br />

that ma<strong>in</strong>ta<strong>in</strong><strong>in</strong>g a system can be tedious, <strong>and</strong> even prone to failures requir<strong>in</strong>g a full re<strong>in</strong>stallations. It is <strong>in</strong><br />

this area that Debian is very clearly recognised for its ease of ma<strong>in</strong>tenance <strong>and</strong> upgradeability of a Debian<br />

GNU/L<strong>in</strong>ux system.<br />

Other advantages of Debian are the large collection of available packages – as of February 2004, about<br />

8150 source packages with 13900 b<strong>in</strong>ary packages are reported by http://www.debian.gr.jp/~kitame/<br />

ma<strong>in</strong>t.cgi based on packages <strong>in</strong> the development branch of Debian. A further advantage is the robust <strong>and</strong><br />

powerful mechanism for determ<strong>in</strong><strong>in</strong>g package <strong>in</strong>ter-dependencies, an aspect that can become troubl<strong>in</strong>g on<br />

other types of systems (see also the next section) yet which has worked extremely well for Debian lead<strong>in</strong>g<br />

to a reputation for reliability. Debian is also a distribution support<strong>in</strong>g a wider variety of different hardware<br />

architectures: currently, ten different platforms rang<strong>in</strong>g from x86 to S/390 are supported.<br />

3.2 Why provide Debian packages of R packages?<br />

One reason for provid<strong>in</strong>g a Debian package of an R package is to use Debian package dependencies to ensure<br />

that any system libraries or <strong>in</strong>clude files required to compile the code <strong>in</strong> the R package are available. For<br />

example, the Debian postgresql-dev package must be <strong>in</strong>stalled if the R package Rpgsql is to be <strong>in</strong>stalled<br />

successfully. By provid<strong>in</strong>g the meta-<strong>in</strong>formation of required packages <strong>in</strong> a control file, the build process can<br />

be largely automated.<br />

The second reason is for ease of ma<strong>in</strong>tenance, as we first mentioned above. Someone who already uses<br />

Debian tools such as apt-get to update the packages on a Debian system may f<strong>in</strong>d <strong>in</strong>stall<strong>in</strong>g or updat<strong>in</strong>g<br />

a Debian package to be more convenient than <strong>in</strong>stall<strong>in</strong>g the r-base Debian package plus learn<strong>in</strong>g to update<br />

R packages from with<strong>in</strong> R or externally us<strong>in</strong>g R CMD INSTALL. Because R is beg<strong>in</strong>n<strong>in</strong>g to be used more<br />

widely <strong>in</strong> fields such as <strong>in</strong> biology (e.g. Bioconductor) <strong>and</strong> social sciences, we should not count on the typical<br />

user be<strong>in</strong>g an R guru. Hav<strong>in</strong>g R packages controlled by apt-get seems worth the small amount of overhead<br />

<strong>in</strong> creat<strong>in</strong>g the Debian packages. This also applies to systems ma<strong>in</strong>ta<strong>in</strong>ed by (presumably non-R us<strong>in</strong>g)<br />

system adm<strong>in</strong>istrators who may already be more familiar with Debian’s package mechanism. By us<strong>in</strong>g this<br />

system to distribute CRAN packages, another learn<strong>in</strong>g curve is avoided for those who may not actually use<br />

R but simply provide it for others.<br />

2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!