[Rd] trace an Rd conversion error in R cmd check
William Dunlap
wdunlap at tibco.com
Wed Oct 12 19:32:28 CEST 2011
Good luck in tracking down the problem. I won't give
any help there.
I've seen this sort of error message (or worse) when using
system.file() and the desired file didn't exist. If that
is the problem, add the newish argument mustWork=TRUE to
the call to system.file so you get an error message from system.file
instead of a warning or inappropriate behavior from the function
that is confused by the "" that system.file() returns when the
desired file doesn't exist.
> con <- file(system.file(package="base", "noSuchFile"), "r")
Warning message:
In file(system.file(package = "base", "noSuchFile"), "r") :
file("") only supports open = "w+" and open = "w+b": using the former
> con <- file(system.file(package="base", "noSuchFile", mustWork=TRUE), "r")
Error in system.file(package = "base", "noSuchFile", mustWork = TRUE) :
no file found
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -----Original Message-----
> From: r-devel-bounces at r-project.org [mailto:r-devel-bounces at r-project.org] On Behalf Of Joshua Wiley
> Sent: Wednesday, October 12, 2011 9:46 AM
> To: r-devel at r-project
> Subject: Re: [Rd] trace an Rd conversion error in R cmd check
>
> Thanks to Drs. Murdoch and Ripley for your fast and helpful replies.
> I did not realize that R CMD check was R code, so that was incredibly
> useful.
>
> I spent the morning working on debugging this, and I think I must have
> messed up setting up the Windows tool chain, because I get the error
> even when running R CMD check on other packages (e.g., MASS). I am
> still not sure what exactly I am missing/setup incorrectly. R
> compiled from source and passed make check all without any trouble. I
> can install packages, and I can make PDFs using tools:::..Rd2pdf, but
> when I try to use Rd2pdf on a package instead of specific files I get
> the error.
>
> Looking at the R code for CMD check helped me better understand the
> process and I will just work with my tool chain until I get things
> working.
>
> Thanks again!
>
> Josh
>
>
>
> On Wed, Oct 12, 2011 at 4:10 AM, Prof Brian Ripley
> <ripley at stats.ox.ac.uk> wrote:
> > R CMD check is R code: you can run the R code for yourself using R's
> > debugging facilities. In this case start with 'R CMD Rd2pdf pkg-name'
> > (which should give the same error, as that is what R CMD check calls), then
> > run that R code directly (there are comments in the code in R-devel about
> > how to do so).
> >
> > On Wed, 12 Oct 2011, Joshua Wiley wrote:
> >
> >> Hi All,
> >>
> >> Apologies if this is a very naive question. Is there a way to see the
> >> particular Rd file being processed right before a warning/error
> >> occurs? As far as I can tell, all my .Rd files use have names and
> >> titles and they are unique between Rd files (sometimes in a file I use
> >> something like \name{foo} \title{Foo}). I seem to be able to convert
> >> files to latex using: R CMD Rdconv --type=latex on all my Rd files
> >> without problems.
> >>
> >> Here is the warning and error:
> >>
> >> * checking PDF version of manual ... ERROR
> >> Rd conversion errors:
> >> Warning in file(con, "r") :
> >> file("") only supports open = "w+" and open = "w+b": using the former
> >> Error : : Sections \title, and \name must exist and be unique in Rd files
> >>
> >> I am using:
> >>
> >> R Under development (unstable) (2011-10-11 r57214)
> >> Platform: x86_64-pc-mingw32/x64 (64-bit)
> >> on Windows 7 with Rtools 2.14 and MikTeX 2.9
> >>
> >> Any suggestions or pointers to manuals/documentation would be greatly
> >> appreciated.
> >
> > This is far too rare a problem to be documented in detail.
> >
> >> Thanks,
> >>
> >> Josh
> >>
> >>
> >> --
> >> Joshua Wiley
> >> Ph.D. Student, Health Psychology
> >> Programmer Analyst II, ATS Statistical Consulting Group
> >> University of California, Los Angeles
> >> https://joshuawiley.com/
> >>
> >> ______________________________________________
> >> R-devel at r-project.org mailing list
> >> https://stat.ethz.ch/mailman/listinfo/r-devel
> >>
> >
> > --
> > 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
> >
>
>
>
> --
> Joshua Wiley
> Ph.D. Student, Health Psychology
> Programmer Analyst II, ATS Statistical Consulting Group
> University of California, Los Angeles
> https://joshuawiley.com/
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
More information about the R-devel
mailing list