[R] Script to start Rcmdr

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Mar 3 14:57:27 CET 2008


On Mon, 3 Mar 2008, Ronaldo Reis Junior wrote:

> Hi,
>
> anybody know any way to make a bash script to start Rcmdr directly widthout
> need to open R and execute library(Rcmdr)?
>
> I try to make this using R CMD BATCH somethink, but dont find the way.

For some reason, Rcmdr requires an interactive session:

gannet% Rscript -e 'library(Rcmdr)'
Loading required package: tcltk
Loading Tcl/Tk interface ... done
The Commander GUI is launched only in interactive sessions

However, I was able to do

gannet% cat foo
#!/bin/sh
R_DEFAULT_PACKAGES=Rcmdr R

Probably you need R in interactive mode to respond to the Tcl/Tk callbacks 
(and not just terminate when no input is found).

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list