This is a follow up from a previous question.
How to integrate new R6Class functions stored in independent files into an existing R package?
In summary, in trying to load a function stored in a file. I managed to do it by altering manually the NAMESPACE and Collate in the DESCRIPTION and rebuilding the package. However, I am sure this is not standard practice since the package already has a man folder and .Rd files created with roxygen2. However, when I try to use roxygen2 to manage my NAMESPACE and Collate in the DESCRIPTION, the following error pops up.
==> devtools::document(roclets=c('rd', 'collate', 'namespace'))
Updating mypackage documentation
Loading mypackage
Error in loadNamespace(name) : there is no package called ‘testthat’
Calls: suppressPackageStartupMessages ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted
Exited with status 1.
The working directory contains a folder tests with a testhat.R file and a second folder full of functions.
Any hint of why roxygen2 is falling to produce the documentation and update the NAMESPACE and DESCRIPTION?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…