The command 'R CMD check' runs the R files in the project's tests directory.
The directory structure:
toplevel
project
R
rmongo.R
tests
RMongo-Ex.R
When i R CMD check project in toplevel directory, i run into this error: cannot open file '../R/rmongo.R': No such file or directory
because my test file sources the R code file: source('../R/rmongo.R', chdir=TRUE)
How can I make R CMD check cd into the test directory before running test file?