I am using Hadley's testthat-based approach for automated testing of my package.
With this approach, what is the most suitable place to put test data files that is files only used by the test scripts in tests/testthat), but not by any other functions in R/?
My current approach is to put them in tests/testdata
, and then read.table
from there with a relative path rather than with system.file (in order to avoid the need to install the package to run tests).
Is there a standard way to do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…