[R] How can I run package ca (correspondence analysis), which needs rgl, without X11?
Duncan Murdoch
murdoch.duncan at gmail.com
Mon Apr 23 18:33:56 CEST 2012
On 23/04/2012 12:05 PM, Jocelyn Ireson-Paine wrote:
> I want to invoke R on a Linux Web server from Java, in order to analyse
> data in ways that would take too long to code, and run too slowly, in
> Java. In particular, to do correspondence analyses. To this end, I've
> installed R version 2.15.0 on my Web host's x86_64 GNU/Linux machine, and
> tried using package "ca" to run the "author" example of correspondence
> analysis on page 3 of http://cran.r-project.org/web/packages/ca/ca.pdf .
>
> But there's a problem anent X11. My Web host's Linux doesn't have X11, and
> its administrator says that it would be hairy for him to install, because
> of its dependencies. So when I installed R, I did so without X11. Since
> I'm not going to plot graphs interactively, I wasn't expecting to need it
> anyway.
>
> However, I find that ca requires it. When I did
> install.packages("ca")
> (from Bristol mirror), it downloaded rgl_0.92.879.tar.gz and
> ca_0.33.tar.gz, then started its checks, and then complained:
> checking for X... no
> configure: error: X11 not found but required, configure aborted.
> ERROR: configuration failed for package 'rgl'
> * removing '/home/jp/r/R-2.15.0/library/rgl'
> ERROR: dependency 'rgl' is not available for package 'ca'
> * removing '/home/jp/r/R-2.15.0/library/ca'
>
> Why? Not all uses of ca require X11. For example, if you merely call the
> ca function without plotting anything, that surely can't need it.
> Moreover, one can plot to PDF without needing X11. I managed to do so from
> another correspondence-analysis package, ade4, by redirecting my plot to
> PDF and then running the Bordeaux example near the top of
> http://pbil.univ-lyon1.fr/ade4/ade4-html/bordeaux.html . (I then converted
> the PDF to PNG using ImageMagick.) So if ade4 can do this, ca ought to be
> able to. How can I make it? I don't mind ca complaining when it indeed
> does need X11, but couldn't the dependency check be postponed until
> runtime, so as not to spoil things for people to whom it's irrelevant?
That sounds reasonable -- you should ask the maintainer of ca to
consider listing rgl only as a suggestion, not a dependency. It may
require some other changes (e.g. checks for the presence of rgl before
trying to use it).
Or perhaps you could ask for a minimal installation of X11. rgl will be
happy with the Xvfb "virtual" server. It won't display anything, but
the calls into X11 work. I don't know if it's any easier to install
than all of X11, though.
Duncan Murdoch
>
> Thanks,
>
> Jocelyn Ireson-Paine
> http://www.j-paine.org
>
> Jocelyn's Cartoons:
> http://www.j-paine.org/blog/jocelyns_cartoons/
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list