carpentries-incubator / lesson-R-packaging

R Packaging
https://carpentries-incubator.github.io/lesson-R-packaging/
Other
5 stars 10 forks source link

Missing dependencies for test coverage section #99

Open PabRod opened 1 year ago

PabRod commented 1 year ago

Problem

The subsection about test coverage requires the installation of a few packages.

Solution

install.packages(c("covr", "DT", "htmltools"))
bvreede commented 1 year ago

In addition, the covr::report() function does not work for a lot of people; they get errors similar to:

Warning: package ‘mysterycoffee’ is in use and will not be installed
Error in file(con, "r") : cannot open the connection
In addition: Warning message:
In file(con, "r") :
  cannot open file 'C:/Users/UserName/AppData/Local/Temp/RtmpGiF8LO/R_LIBS35bc55736419/Hgear/R/mysterycoffee': No such file or directory

What seems to fix the issue is running devtools::build(). It is not clear to me exactly why.