Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vignette creation on package build fails with the error "Failed to locate the ‘weave’ output file"

Tags:

r

knitr

I've written an R package, which lives here and contains a vignette intended to step users through the rationale behind the package and how to best use it.

Unfortunately, on an attempt to build a source or binary package, the vignette construction fails with the following error:

* creating vignettes ... ERROR
Error: processing vignette 'session reconstruction.Rmd' failed with diagnostics:
Failed to locate the ‘weave’ output file (by engine ‘knitr::rmarkdown’) for vignette with name ‘session reconstruction’. The following files exist in directory ‘.’: ‘session reconstruction.Rmd’, ‘session_clusters.png’, ‘session_reconstruction.html’
Execution halted
Error: Command failed (1)
Execution halted

Exited with status 1.

Version information on the machine I'm building on:

> R.Version()
$platform
[1] "x86_64-pc-linux-gnu"

$arch
[1] "x86_64"

$os
[1] "linux-gnu"

$system
[1] "x86_64, linux-gnu"

$status
[1] ""

$major
[1] "3"

$minor
[1] "1.2"

$year
[1] "2014"

$month
[1] "10"

$day
[1] "31"

$`svn rev`
[1] "66913"

$language
[1] "R"

$version.string
[1] "R version 3.1.2 (2014-10-31)"

$nickname
[1] "Pumpkin Helmet"

I've googled around and there doesn't seem to be a "proper" diagnosis: people have reported encountering similar errors, normally fixed with an upgrade to R 3.1.0 (which I'm using. Well, past using). Can anyone help me out?

like image 970
Oliver Keyes Avatar asked Dec 07 '14 02:12

Oliver Keyes


2 Answers

I did not fully investigate the problem, but it seems that removing the spaces in the filename solves the problem.

like image 155
Yihui Xie Avatar answered Oct 21 '22 20:10

Yihui Xie


I ran into a similar problem so I came to this site. I had constructed a vignette "Intro to XXX.Rmd", which failed. I changed the file to "Intro_to_XXX.Rmd" and R CMD check (CMD/Shift E in RStudio) worked.

like image 39
Greg Alvord Avatar answered Oct 21 '22 19:10

Greg Alvord