I've been writing a personal package with reference to Hadley's guide. However, adding a minimal vignette using devtools::use_vignette()
seems to break devtools::check()
.
When I try to run check()
I get one error:
file 'C:/path/temp/package/DESCRIPTION' is not in valid DCF format
and one warning:
In read.dcf(dfile, keep.white = .keep_white_description_fields) :
cannot open compressed file 'C:/path/temp/package/DESCRIPTION', probable reason 'Permission denied'
I can successfully run devtools::check()
if I delete the vignettes folder and devtools::build_vignettes()
runs ok.
Edited to add:
I wondered if this was an issue with trying run check from a network location, but I copied the project to C:\R\package_name
and it still returns the same error.
Curiously, this does appear to be machine dependent as I get the above error on my work machine, but not on my personal laptop. Work machine is win7, personal win10.
DESCRIPTION is copied below
Package: pkg_nm
Type: Package
Title: A title
Version: 0.0.0.9000
Authors@R: person("name", "name", email = "[email protected]", role = c("aut", "cre"))
Description: Functions for working with data from my source.
License: OGL
LazyData: TRUE
RoxygenNote: 5.0.1
URL: [url here]
BugReports: [url here]
Imports:
lubridate,
stringr,
dplyr,
lazyeval,
magrittr
Collate:
'my_function.R'
Suggests: knitr,
rmarkdown
VignetteBuilder: knitr
read.dcf(file = "DESCRIPTION")
? – Mcginnisread.dcf()
. It prints the contents of the DCF to the console. – Thorsteinread.dcf()
on the tempfile location returned in the error above I get:Error in read.dcf(file = "C:/Users/r.bot/AppData/Local/Temp/RtmpcLoGrg/Rbuild1f4069c1632e/package/DESCRIPTION") : cannot open the connection In addition: Warning message: In read.dcf(file = "C:/Users/r.bot/AppData/Local/Temp/RtmpcLoGrg/Rbuild1f4069c1632e/package/DESCRIPTION") : cannot open compressed file 'C:/Users/r.bot/AppData/Local/Temp/RtmpcLoGrg/Rbuild1f4069c1632e/package/DESCRIPTION', probable reason 'No such file or directory'
– Thorsteinroxygen2
anddevtools
? I've noticed before that when you have conflicting versions of these packages, they don't always work nicely together. It might be that either devtools or roxygen2 messes up the DESCRIPTION file when building the vignettes. – Apographlibrary(devtools) build_github_devtools() #### Restart R before continuing #### install.packages("devtools.zip", repos = NULL, type = "source")
as described here cran.r-project.org/web/packages/devtools/README.html beacuse I'm stuck behind a corporate firewall. – Thorstein