What is the differende between the two commands? From RStudio docs it says
Thus the two should be identical. However, when I run the following test
testthat::test_that("create_initial_tourplan works", {
vrp <- package1::createdata()
dist_mat <- package::calculate_dist_mat(vrp$locations)
package2::function2(vrp$locations)
})
there are options
Does anybody have an idea? Obviously, it is not reproducible, so I can't provide more information (except somebody has an idea what I should provide)
The difference can be explained if you look into the settings of the package (Build > Configure Build Tools...):
If the option Use devtools package functions if available is NOT checked
CTRL + SHIFT + T will execute the R files in the tests subfolder of the package (where you normally have one R file that calls testthat via test_check("your_package_name")
),
otherwise devtools:test()
is used which directly calls the tests in the tests/testthat subfolder.
PS: I cannot diagnose what exactly is causing your error message