I meant which line in the vignette was causing a problem, but that was a long shot whether you'd be able to tell. The build message isn't very specific. But it makes me think of a common scenario with this error message: it's shown when the "file path" is actually a directory path.
This is probably something with the code in your package. None of the non-package code in the vignette seems to have a problem. But it can still help to figure out which call in the Rmd gives the error.
A process to find it:
-
Insert this somewhere into a chunk in your Rmd:
stop("Everything works up to here")
-
Rebuild the package. Either the file error or the custom error will stop the process.
-
If it was the file error, move the custom stop() one line higher. If it was the custom error, move it one line lower. (Or, to minimize the time and learn a neat algorithm, move it according the binary search algorithm.)
-
When moving the custom stop() command by a single line changes which error stops the process, you've found the culprit line.
After that, you'll need to dig into your package's code.
Total guess
Many of the functions in R/disk.frame.r assume there are only files in the directory named in a disk.frame's "path" attribute. For example:
head.disk.frame <- function(df, n = 6L, ...) {
stopifnot(is_ready(df))
path1 <- attr(df,"path")
cmds <- attr(df, "lazyfn")
if(dir.exists(path1)) {
path2 <- list.files(path1,full.names = T)[1]
head(disk.frame:::play(fst::read.fst(path2, from = 1, to = n, as.data.table = T), cmds), n = n, ...)
} else {
head(disk.frame:::play(fst::read.fst(path1, from = 1, to = n, as.data.table = T), cmds), n = n, ...)
}
}
What if path2 is a directory?