6

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 = "emal@email.com", 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
r.bot
  • 5,309
  • 1
  • 34
  • 45
  • What is the error message when you do `read.dcf(file = "DESCRIPTION")`? – HubertL Apr 07 '17 at 18:43
  • There is no error message when I do `read.dcf()`. It prints the contents of the DCF to the console. – r.bot Apr 08 '17 at 10:32
  • However, if I try to do `read.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'` – r.bot Apr 08 '17 at 10:44
  • I see RoxygenNote 5.0.1, but we're at 6.0.1 now. Did you try to first update `roxygen2` and `devtools`? 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. – Joris Meys Apr 08 '17 at 10:45
  • @JorisMeys thanks, I've updated both to the latest cran versions and get the same error message. I can't do `library(devtools) build_github_devtools() #### Restart R before continuing #### install.packages("devtools.zip", repos = NULL, type = "source")` as described here https://cran.r-project.org/web/packages/devtools/README.html beacuse I'm stuck behind a corporate firewall. – r.bot Apr 08 '17 at 10:53
  • @r.bot the latest CRAN versions should be OK. – Joris Meys Apr 08 '17 at 10:59
  • @JorisMeys, thanks, so it's not that then. – r.bot Apr 08 '17 at 11:01

0 Answers0