FredHutch / VISCtemplates

Tools for writing reproducible reports at VISC
Other
4 stars 2 forks source link

VISCfunctions to Imports #164

Closed slager closed 3 weeks ago

slager commented 3 weeks ago

I was doing some VISCtemplates testing on my personal laptop, roughly this:

create_visc_project("~/repos/VDC123Analysis")
use_visc_report(report_name = "Example-PT-Report", report_type = "generic")
# knit Example-PT-Report/Example-PT-Report.Rmd

I got this error when trying to knit Example-PT-Report.Rmd, because VISCfunctions was not already installed:

processing file: Example-PT-Report.Rmd

Error in `library()`:
! there is no package called 'VISCfunctions'
Backtrace:
 1. base::library(VISCfunctions)

Quitting from lines 49-83 [package-loading-and-options] (Example-PT-Report.Rmd)
Execution halted

Being able to knit a generic report from the template is fairly central to VISCtemplates, so this PR adds VISCfunctions to the Imports for the VISCtemplates package. I include a work-around to avoid R CMD check warnings. With the change, VISCfunctions will get auto-installed whenever someone installs VISCtemplates from GitHub, which should reduce friction using VISCtemplates.

kelliemac commented 3 weeks ago

Looks good to me!