From ggrothendieck at gmail.com  Mon Apr 16 18:14:50 2007
From: ggrothendieck at gmail.com (Gabor Grothendieck)
Date: Mon, 16 Apr 2007 12:14:50 -0400
Subject: [Rd] Sweave.sh shell script on CRAN
In-Reply-To: <462387F4.5070506@stats.uwo.ca>
References: <46235791.6080308@bfro.uni-lj.si> <46235CB6.3050201@stats.uwo.ca>
	<462363B1.7000406@bfro.uni-lj.si> <462381EF.2050009@stats.uwo.ca>
	<971536df0704160713l1a48eb5ak2d6c555b9e4a20a2@mail.gmail.com>
	<462387F4.5070506@stats.uwo.ca>
Message-ID: <971536df0704160914r28ef7a52xa9d4a804e3ab1262@mail.gmail.com>

On 4/16/07, Duncan Murdoch <murdoch at stats.uwo.ca> wrote:
> On 4/16/2007 10:13 AM, Gabor Grothendieck wrote:
> > On 4/16/07, Duncan Murdoch <murdoch at stats.uwo.ca> wrote:
> >> On 4/16/2007 7:53 AM, Gregor Gorjanc wrote:
> >> > Duncan Murdoch wrote:
> >> >>> I do not have any experience with use of (bash) shell scripts under
> >> >>> Windows. Sweave.sh can be used with Cygwin, but I am not sure how to use
> >> >>> shell script without Cygwin. I noticed that some "scripts" in R*/bin
> >> >>> directory on our Windows machine are perl (build, check, INSTALL, ...)
> >> >>> and shell (Rd2dvi.sh, Stangle.sh, Sweave.sh, ...) scripts. This
> >> >>> therefore means that R ships also perl and shell interpreter or am I
> >> >>> missing something?
> >> >>
> >> >> We don't ship Perl or sh.exe, but we do describe how to get them in the
> >> >> R Admin manual.
> >> >
> >> > Maybe I got this totally wrong. Say someone who uses Windows finds R and
> >> > installs it via setup file. Can he/she launch the folowing without
> >> > having Perl and/or sh.exe?
> >> >
> >> > R CMD script whateverOption
> >>
> >> No.  Installing a binary package has a pure R implementation so it
> >> doesn't need R CMD, but most of the capabilities of R CMD are not
> >> available with a basic R install.
> >
> > Can you just clarify what the dependencies are for
> >
> > Rcmd sweave
> >
> > where Rcmd is the Rcmd command distributed with R that is run
> > from the Windows command line.   Does that require perl or other
> > tools to run?
>
> That needs sh.exe, not Perl.  But it's just the equivalent of
>
>  echo "library('utils'); Sweave('filename')" | Rterm --no-restore --slave
>
> at the command line or
>
>  Sweave("filename")
>
> in a standard R session.

Thanks for the explanation.  I could look into replacing Rcmd with the Rterm
pipeline in the sweave.bat script to eliminate the sh.exe dependency so
sweave.bat can be used with a basic R installation.



[Rd] Sweave.sh shell script on CRAN
Gabor Grothendieck