[R] installing R packages in Windows?

Guido Masarotto guido@sirio.stat.unipd.it
Sun, 22 Nov 1998 16:33:51 +0100


On Sat, Nov 21, 1998 at 11:54:09PM +0100, Peter Dalgaard BSA wrote:
> Prof Brian Ripley <ripley@stats.ox.ac.uk> writes:
> 
> > All of this is very experimental, so do be careful not to trust the
> > results.  As gunwin32 R has no batch mode, I cannot check standard
>             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > scripts easily and have only run cursory checks.
> 
> How difficult would it be to create one? I suspect that all you need
> is to avoid starting up the console and do stdio instead. The ESS
> (Emacs Speaks Statistics) crowd will want this as well.

  I am not really a MsWindows programmer so I will try to summarize
  what I know hoping that others (Luke?) will suggest the right direction.

  There are two possibilities easy to implement but not completly
  satisfactory:
  1) to build a only `stdio`  executable, i.e., to have an executable
     which behaves as when you start the Unix one with the 
     --no-readline flag; I suppose that this can be used with ESS
     but I don't use Emacs under Windows so I don't know
     how Emacs manages sub-processes. This new exe must be called
     R.exe (as the other one; if you change the name you will
     have to provide different dll's; which is not what we want;
     but if it is called R.exe (-> it cannot be put
     in RHOME/bin) it can share all the other files). Surely, it 
     will be possible to do batch processing like under Unix
     (redirection provides by the shell from which you launch it).
     I have no tried but this would require minimal change (I suppose
     that I can have it in less than 1 hour); so, if someone wants
     to test it, just ask. 
  2) to add batch processing to the actual executable,i.e, to let 
     possible to launch R with a command line of the type
     R --input-from afile --output-to anotherfile
     In this case, no console is open and R will run in background
     (maybe it can open a small window just saying 
      "R is running; this is the moment for a cup of coffee"
      we need it I think (at least to be able to kill the
      process)). If you will not use the command line arguments
      the standard console will open. R.exe will be a standard
      Windows executable (no character console, no stdin/stout/stderr)
      -> no ESS support.

   On the other end, the ideal solution will be to have an executable
   which on demand (i.e., using the --no-readline flag, I suppose)
   will or open the graphics console or use `stdio`.
   Somewhere in the Win32 API must exist something which let this.
   But I have to find out where. Perhaps, someone here can help
   Problem is that standard Windows application are either
   
   (i) completly `windowed', like Robert's and mine version of R;
   in this case, they don't have standard input and output; 
   indeed if you launch  it from a character console, they behave
   more or less  as if, under Unix, you launch an application
   from an xterm using the background flag (&) 
   and with stdin and   stdout redirected to /dev/null;
   
   or
   
   (ii) `console` applications; in this case stdin and stdout are there;
   but the side effect is that they ALWAYS open a character console
   (or `lock` the one from which you have launched them); 
   
   g.
   
   
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._