From spencer.graves at structuremonitoring.com  Sat Feb  5 02:57:31 2011
From: spencer.graves at structuremonitoring.com (Spencer Graves)
Date: Fri, 04 Feb 2011 17:57:31 -0800
Subject: [Rd] Reading a specific file during "R CMD check"?
Message-ID: <4D4CAE8B.9080305@structuremonitoring.com>

Hello, All:


       How can I obtain the location of an example data file in a 
package during "R CMD check"?


       I want to include sample raw data files in a package and have 
them read by a function in the package.  It occurs to me to put such a 
file in "\inst\rawdata" and have examples find the data using something 
like "system.file('rawdata', package='MyPackage')". However, this will 
only work if the desired data are already in a version of 'MyPackage' 
that is already installed.  If I change the data, this will return the 
old data, not the modified.  I've looked at packages RUnit and svUnit, 
but have not spent enough time with either to know if they include a 
solution to this problem.


       Thanks for your help.
       Spencer

-- 
Spencer Graves, PE, PhD
President and Chief Operating Officer
Structure Inspection and Monitoring, Inc.
751 Emerson Ct.
San Jos?, CA 95126
ph:  408-655-4567



[Rd] Reading a specific file during "R CMD check"?
Spencer Graves