[Rd] possible bug R CMD check: No space(s) allowed after \VignetteDepends{}

From: Ferdinand Alimadhi <falimadhi_at_gmail.com>
Date: Wed, 18 Jul 2007 18:11:31 -0400

R CMD check gives an error when a vignette entry %\VignetteDepends{} has any extra space at the end.
Maybe this is by design, but I found it confusing.

Changing the function "vignetteMetaRE" in tools package could solve the problem. I.e.

vignetteMetaRE <- function(tag)

    paste("[[:space:]]*%+[[:space:]]*\\\\Vignette", tag,"\\{([^}]*)\\}", sep = "")


vignetteMetaRE <- function(tag)

    paste("[[:space:]]*%+[[:space:]]*\\\\Vignette", tag,"\\{([^}]*)\\}[[:space:]]*", sep = "")


The test package I'm using has only one vignette:


%\VignetteIndexEntry{some entry}


R CMD build, R CMD check and R CMD INSTALL run successfully.

If I add an extra space after %\VignetteDepends{stats} then "R CMD check" fails

w5:falimadh [~/work/mypkg]> R CMD check testpkg
* checking for working latex ... OK

See the information on DESCRIPTION files in the chapter 'Creating R packages' of the 'Writing R Extensions' manual.

The error message is from tools:::.check_package_depends() function which is used by R CMD check.
check_package_depends() calls .build_vignette_index() to get the vignettes dependency list

For my test package, the result is:

> reqs <-
unique(unlist(tools:::.build_vignette_index("testpkg/inst/doc/")$Depends)) > reqs
[1] "stats "

"stats " (with a space at the end) is not in the depend field of my package description ("stat" is). And that's where the error comes from.

Does this make sense ?


> R.Version()
[1] "x86_64-redhat-linux-gnu"

[1] "x86_64"

[1] "linux-gnu"

[1] "x86_64, linux-gnu"

[1] ""

[1] "2"

[1] "5.1"

[1] "2007"

[1] "06"

[1] "27"

$`svn rev`
[1] "42083"

[1] "R"

[1] "R version 2.5.1 (2007-06-27)"


        [[alternative HTML version deleted]]

R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu 19 Jul 2007 - 00:32:30 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 21 Jul 2007 - 06:36:46 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.