Closed statnmap closed 2 years ago
Apparently, now all packages that are listed in Suggests must be conditionally loaded. You have to test if they are installed, otherwise you should not run the vignette or the test. I'll have to look for the packages in another way in {attachment}... :disappointed: Example here for a vignette : https://github.com/adamhsparks/epicrop/blob/d311ab5489e3f82fd6a67cdba8348af361c87fe5/vignettes/epirice.Rmd#L20 And here for a unit test: https://github.com/openplantpathology/hagis/commit/b9227fcee927f846cbd7fc9a9e7637a0cf23d795
Suggests
Search for : skip_if_not_installed() or requireNamespace()
skip_if_not_installed()
requireNamespace()
requireNamespace() already included in att_from_rscript() And concerning unit tests, developers would have to use library() or pkg::fun(), so this is also included.
att_from_rscript()
library()
pkg::fun()
Apparently, now all packages that are listed in
Suggests
must be conditionally loaded. You have to test if they are installed, otherwise you should not run the vignette or the test.I'll have to look for the packages in another way in {attachment}... :disappointed: Example here for a vignette : https://github.com/adamhsparks/epicrop/blob/d311ab5489e3f82fd6a67cdba8348af361c87fe5/vignettes/epirice.Rmd#L20 And here for a unit test: https://github.com/openplantpathology/hagis/commit/b9227fcee927f846cbd7fc9a9e7637a0cf23d795
Search for :
skip_if_not_installed()
orrequireNamespace()