From spluque at gmail.com  Thu Apr 12 20:20:02 2012
From: spluque at gmail.com (Sebastian P. Luque)
Date: Thu, 12 Apr 2012 13:20:02 -0500
Subject: [Rd] LazyData and CSV files in data/
Message-ID: <87wr5kzub1.fsf@kolob.subpolar.dyndns.org>

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



[Rd] LazyData and CSV files in data/
Sebastian P. Luque