[Rd] LazyData and CSV files in data/

From: Sebastian P. Luque <spluque_at_gmail.com>
Date: Thu, 12 Apr 2012 13:20:02 -0500


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"),


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?



R-devel_at_r-project.org mailing list
Received on Thu 12 Apr 2012 - 18:24:59 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

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 Thu 12 Apr 2012 - 18:50:44 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.

list of date sections of archive