This is the content of the Sweave script in lib/R/bin

# ${R_HOME}/bin/Sweave -*- sh -*-

R_EXE="${R_HOME}/bin/R"

R_SWEAVE_OPTIONS=${R_SWEAVE_OPTIONS:='--no-restore --slave'}

args=
while test -n "${1}"; do
  ## quote each argument here, unquote in R code.
  args="${args}nextArg${1}"
  shift
done

echo "utils:::.Sweave()" | "${R_EXE}" $R_SWEAVE_OPTIONS --args ${args}

as you can see, it gets run essentially as a pipe to R, instead of through
R script.  That means command line variable parsing in
.BiocCheckFromCommandLine gets messed up. This is probably easy to fix, but
it requires some insight into the R function.

I like how the Sweave script uses that R_HOME is defined when run through R
CMD XX.

Best,
Kasper


On Thu, May 29, 2014 at 11:07 AM, Dan Tenenbaum <dtene...@fhcrc.org> wrote:

> Hi Kasper,
>
> ----- Original Message -----
> > From: "Kasper Daniel Hansen" <kasperdanielhan...@gmail.com>
> > To: bioc-devel@r-project.org
> > Sent: Wednesday, May 28, 2014 7:20:00 AM
> > Subject: [Bioc-devel] BiocCheck
> >
> > 1) The hash bang in the BiocCheck script currently requires
> > intervention at
> > install time.
> >
>
> Only if you don't have permission to write the script to $R_HOME/bin.
> Otherwise it is handled for you.
>
> I would prefer to use
>
> #!/usr/bin/env Rscript
>
> but the problem with that is you can't add an argument like:
>
> #!/usr/bin/env Rscript --vanilla
>
> env doesn't support that.
>
>
>
> > It would be much more convenient if the script could read of the
> > location
> > of R, in the same way as (say) the Sweave script can.  In fact, I
> > modified
> > the BiocCheck script as per the Sweave script but ran into problems
> > with
> > .BiocCheckFromCommandLine, and figured I better stop.
> >
>
> What does Sweave do? What problem did you run into?
>
>
> > 2) Re. the checks for coding style: it would be convenient if there
> > was an
> > option (perhaps disabled by default, perhaps not) which lists the
> > offending
> > files for each "issue".
> >
>
> I think this would need to be disabled by default; in practice I see that
> many many files per package are "offending".
>
> I can't get to this right away but I've added
>
> https://github.com/Bioconductor/BiocCheck/issues/13
>
> Dan
>
>
> > Best,
> > Kasper
> >
> >       [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > Bioc-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/bioc-devel
> >
>

        [[alternative HTML version deleted]]

_______________________________________________
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

Reply via email to