testDataPath
Find Data Files for Tests in SNTEST/Data Directory

Description

Return the path to a data file stored under Sys.getenv("SNTEST")/Data.

Usage

testDataPath(..., SNTEST = testGetSNTEST())
testSetSNTEST(SNTEST)
testGetSNTEST()
testCheckSNTEST(SNTEST)

Arguments

... The file name, relative to SNTEXT/Data. If it is in a subdirectory of SNTEXT/Data then split up its name into path elements (e.g., use testDataPath("excel", "t1.xls") instead of testDataPath("excel\t1.xls")).
SNTEST The home directory of SNext. Its Data directory should contain the data files.

Details

The default value of SNTEST is taken from the environment variable SNTEST, which may be set from outside or inside of R. testSetSNTEST() and testGetSNTEST() set and get that variable and also call testCheckSNTEST() to check that it looks like a valid value (or throw an error if not). Currently that means that SNTEST and SNTEST/Data are both directories.
Value
testDataPath() returns a path to the data file that can be used by any R function that requires a file name.
Note
These functions stop if the directories or files requested do not exist.
Author
Bill Dunlap, TIBCO Software, Inc.
References
Test Authoring Guidelines and Convention. http://emea-got-moss01.emea.tibco.com/engineering/projectsites/rosebud/Shared%20Documents/Test%20Authoring%20Guidelines%20and%20Conventions.docx
See Also
assertionTest
Examples
  ## Not run: 
  read.table(testDataPath("fuel.frame.txt"), header=TRUE)
  
## End(Not run)
Package assertionTest version 6.0.0-69
Package Index