[Rd] Error when using buildVignettes()

Henrik Bengtsson hb at biostat.ucsf.edu
Wed Aug 28 23:49:25 CEST 2013


> > sessionInfo()
> R version 3.0.0 Patched (2013-04-11 r62551)
> Platform: x86_64-apple-darwin10.8.0 (64-bit)

I would check with R 3.0.1 patched and R devel before anything else,
especially when troubleshooting vignette-related issues.

/Henrik


On Wed, Aug 28, 2013 at 12:33 PM, cstrato <cstrato at aon.at> wrote:
> Dear all,
>
> When running function 'testQAReport()', which uses function
> 'buildVignettes()' to create a pdf-file I get the following error:
>
>> source("testQAReport.R")
>> testQAReport()
> Error in .get_package_metadata(pkgdir) :
>   Files 'DESCRIPTION' and 'DESCRIPTION.in' are missing.
>
> Since I did not get this error in earlier versions of R, could you please
> tell me what may be the reason for this error?
>
>
> Here is the code for "testQAReport.R":
>
> #------------------------------------------------------------------------------#
> # testQAReport.R: test quality control report
> # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - -
> testQAReport <-
> function(dataset     = "My Dataset",
>          title       = "Quality Report",
>          date        = "October, 2011",
>          author      = "Christian Stratowa",
>          outdir      = file.path(getwd(), "TestQA"),
>          ...)
> {
>    ## directory containing parts of QAReport.Rnw
>    indir <- file.path(path.package("xps"), "QC");
>
>    ## create directory containing final QAReport.Rnw
>    if (!dir.create(outdir))
>       stop("could not create report directory");
>    if (!dir.create(file.path(outdir, "inst")))
>       stop("could not create report subdirectory 'inst'");
>    if (!dir.create(file.path(outdir, "inst", "doc")))
>       stop("could not create report subdirectory 'doc'");
>    docdir <- file.path(outdir, "inst", "doc");
>
>    QCb <- readLines(file.path(indir, "QC.begin.Rnw"));
>
>    ## replace title, date, author
>    QCb <- sub("@TITLE@",  title,  QCb);
>    QCb <- sub("@DATE@",   date,   QCb);
>    QCb <- sub("@AUTHOR@", author, QCb);
>
>    ## dataset info
>    numtrees <- 6; chipname <- "Test3"; chiptype <- "GeneChip";
>    QCb <- sub("@DATASET@",  dataset,  QCb);
>    QCb <- sub("@NUMTREES@", numtrees, QCb);
>    QCb <- sub("@CHIPNAME@", chipname, QCb);
>    QCb <- sub("@CHIPTYPE@", chiptype, QCb);
>
>    write(QCb, file.path(docdir, "QAReport.Rnw"));
>
>    QCe <- readLines(file.path(indir, "QC.end.Rnw"));
>    QCe <- sub("@DATASET@",  dataset,  QCe);
>    QCe <- gsub("_","\\\\_", QCe);
>
>    write(QCe, file.path(docdir, "QAReport.Rnw"), append=TRUE);
>
>    ## build vignette QC.pdf
>    if (require(tools)) {
>       buildVignettes(dir=outdir, lib.loc=NULL, quiet=FALSE, clean=FALSE);
>    }#if
> }#xpsQAReport
>
> #------------------------------------------------------------------------------#
>
> The file "QC.begin.Rnw" is as follows:
>
> \documentclass{article}
>
>
> \textwidth=6.2in
> \textheight=8.5in
> %\parskip=.3cm
> \oddsidemargin=.1in
> \evensidemargin=.1in
> \headheight=-.3in
>
> \newcommand{\Rfunction}[1]{{\texttt{#1}}}
> \newcommand{\Rmethod}[1]{{\texttt{#1}}}
> \newcommand{\Rcode}[1]{{\texttt{#1}}}
> \newcommand{\Robject}[1]{{\texttt{#1}}}
> \newcommand{\Rpackage}[1]{{\textsf{#1}}}
> \newcommand{\Rclass}[1]{{\textit{#1}}}
> \newcommand{\Cclass}[1]{{\textit{#1}}}
> \newcommand{\Rexten}[1]{{\textit{#1}}}
> \newcommand{\xps}{\Rpackage{xps}}
> \newcommand{\ROOT}{\Robject{ROOT}}
>
> \begin{document}
>
> \title{@TITLE@}
> \date{@DATE@}
> \author{@AUTHOR@}
> \maketitle
>
> \tableofcontents
>
>
> \section{Introduction}
>
>  This is the quality assessment report for the dataset '@DATASET@'. The
> dataset consists of
>  @NUMTREES@ Affymetrix @CHIPTYPE@ arrays of type '@CHIPNAME@'. \\
>
>  This report was generated using function \Rfunction{xpsQAReport} of package
> \xps. \\
>
>
> The file "QC.end.Rnw" is as follows:
>
> \section{Summary}
>
>  The current quality report for dataset '@DATASET@' displays the most
> important quality plots, using the
>  default settings for most plots. Package \xps\ contains additional plots
> which can be used for further
>  quality assessments. \\
>
>
> \section*{Session Information:}
>
> <<echo=FALSE>>=
> sessionInfo()
> @
>
> \end{document}
>
>
> Finally, the output which is located in TestQA/inst/doc/QAReport.Rnw is as
> follows:
>
> \documentclass{article}
>
>
> \textwidth=6.2in
> \textheight=8.5in
> %\parskip=.3cm
> \oddsidemargin=.1in
> \evensidemargin=.1in
> \headheight=-.3in
>
> \newcommand{\Rfunction}[1]{{\texttt{#1}}}
> \newcommand{\Rmethod}[1]{{\texttt{#1}}}
> \newcommand{\Rcode}[1]{{\texttt{#1}}}
> \newcommand{\Robject}[1]{{\texttt{#1}}}
> \newcommand{\Rpackage}[1]{{\textsf{#1}}}
> \newcommand{\Rclass}[1]{{\textit{#1}}}
> \newcommand{\Cclass}[1]{{\textit{#1}}}
> \newcommand{\Rexten}[1]{{\textit{#1}}}
> \newcommand{\xps}{\Rpackage{xps}}
> \newcommand{\ROOT}{\Robject{ROOT}}
>
> \begin{document}
>
> \title{Quality Report}
> \date{October, 2011}
> \author{Christian Stratowa}
> \maketitle
>
> \tableofcontents
>
>
> \section{Introduction}
>
>  This is the quality assessment report for the dataset 'My Dataset'. The
> dataset consists of
>  6 Affymetrix GeneChip arrays of type 'Test3'. \\
>
>  This report was generated using function \Rfunction{xpsQAReport} of package
> \xps. \\
>
> \section{Summary}
>
>  The current quality report for dataset 'My Dataset' displays the most
> important quality plots, using the
>  default settings for most plots. Package \xps\ contains additional plots
> which can be used for further
>  quality assessments. \\
>
>
> \section*{Session Information:}
>
> <<echo=FALSE>>=
> sessionInfo()
> @
>
> \end{document}
>
>
> Can you please tell me why function buildVignettes() of the tools package is
> no longer able to convert this file into a pdf-file?
> Thank you in advance.
>
>
>> sessionInfo()
> R version 3.0.0 Patched (2013-04-11 r62551)
> Platform: x86_64-apple-darwin10.8.0 (64-bit)
>
> locale:
> [1] C
>
> attached base packages:
> [1] tools     stats     graphics  grDevices utils     datasets  methods
> [8] base
>
> other attached packages:
> [1] xps_1.21.4
>
> Best regards
> Christian
> _._._._._._._._._._._._._._._._._._
> C.h.r.i.s.t.i.a.n   S.t.r.a.t.o.w.a
> V.i.e.n.n.a           A.u.s.t.r.i.a
> e.m.a.i.l:        cstrato at aon.at
> _._._._._._._._._._._._._._._._._._
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list