[Rd] LazyData and CSV files in data/

Sebastian P. Luque spluque at gmail.com
Thu Apr 12 20:20:02 CEST 2012


Hi,

I'm trying to use 'LazyData: yes' in a package.  A vignette and the
Examples section of help pages contain this:

---<--------------------cut here---------------start------------------->---
zz <- system.file(file.path("data", "fileA.csv"),
                  package="myPackage")
dfA <- read.csv(zz, sep=";", na.strings="")
---<--------------------cut here---------------end--------------------->---

However, building the package fails when working on the vignette:

Warning in file(file, "rt") :
  file("") only supports open = "w+" and open = "w+b": using the former

Error: processing vignette ‘myPackage.Rnw’ failed with diagnostics:
 chunk 5 (label = readin) 
Error in read.table(file = file, header = header, sep = sep, quote = quote,  : 
  no lines available in input

If these lines are removed from the vignette, then the package builds
and checks fine, and after installing the package these lines in the
help pages run fine.  Am I missing something?

Cheers,

-- 
Seb



More information about the R-devel mailing list