svmiller / steveproj

An R package for getting academic projects/papers started.
http://svmiller.com/steveproj
30 stars 3 forks source link

Add to suggested packages used in src scripts in open template #1

Closed medewitt closed 3 years ago

medewitt commented 3 years ago

Likely need to suggest packages used in the src directory:

lapply(c("stringr", "dplyr", "magrittr",
                 "rmarkdown", "bib2df", "stevemisc"), function(x) usethis::use_package(x, type = "Suggests"))
svmiller commented 3 years ago

Done and done. I already had rmarkdown in Imports. I added stevetemplates there as well. While nothing in the R/ directory of the package formally depends on both, the core of the package practically does.

medewitt commented 3 years ago

Cool. Yeah I had a few packages sneak up on me when first running the demo. When you write the tests, I think they'll show as needed in suggests (can't remember how CRAN treats that scenario).

svmiller commented 3 years ago

There's a lot I'm finding out with CRAN on the fly. I think you can place anything you want in suggests but anything mentioned in Namespace or directly in a function needs to go into Imports. In a case like this, I would imagine rmarkdown and stevetemplates are the truly only mandatory things even if the functions in the R/ directory don't call them. Alas, I'm sure I'll find that out soon enough.