https://stat.ethz.ch/pipermail/r-help/2012-September/322985.html
>>> [how] to script [remote] checking for an R package?

https://stat.ethz.ch/pipermail/r-help/2012-September/323000.html
>> I would call something like this via ssh [...]

>> Rscript -e 
>> 'as.numeric(suppressWarnings(suppressPackageStartupMessages(require(ggplot2))))'

https://stat.ethz.ch/pipermail/r-help/2012-September/323024.html
> Thanks! but [the] cluster where I need to run this (where I do *not*
> have root) [lacks Rscript.] So I'm wondering:

> 1 Is there a way to do `Rscript -e` with plain, commandline R?

Incorporating Gergely Daróczi's last suggestion (köszönöm!) I get

# the package for which to check that has the most dependencies
APEX_PKG='M3' # substitute yours
for RSERVER in 'foo' 'bar' 'baz' ; do
  echo -e "${RSERVER} has:"
  ssh ${RSERVER} "R --version | head -n 1"
  ssh ${RSERVER} "echo -e ${RSERVER} has ${APEX_PKG}:"
  ssh ${RSERVER} "R --slave -e 
'as.logical(suppressWarnings(suppressPackageStartupMessages(require(${APEX_PKG}))))'"
  echo # newline
done

which works. I'd still like to know:

> 2 What should my admin have done to install both Rscript and R?
>   (Alternatively, what should I tell my admin to do in order to make
>   both Rscript and R available?)

> 3 Is there any reason to install R without Rscript? (Alternatively,
>   when I ask my admin to install Rscript, is there any objection
>   I should anticipate?)

your assistance is appreciated, Tom Roche <tom_ro...@pobox.com>

______________________________________________
R-help@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.

Reply via email to