[Rd] RMarkdown Vignettest in R packages with child is failing in package build

Witold E Wolski wewol@ki @ending from gm@il@com
Tue Jul 10 17:44:24 CEST 2018


Dear List,

I am working on moving some Rmarkdown reports into the vignettes
folder of a package. While I was able to solve to problem of
parametrized reports in vignettes folder thanks to your invaluable
help (Thank you), I am now struggling with the following problem.


One of the reports which I am moving to vignettes includes the following code :


```{r}
child_docs <- "Grp2Analysis_MissingInOneCondtion.Rmd_t"
if(TRUE){
  child_docs <- "Grp2Analysis_Empty.Rmd_t"
}

```

```{r includeMissingInOne, child = child_docs}
```
   # this is line 351 from the error message

which depending on a test outcome includes one or the other Rmarkdown
document into the main document.


While this report renders executing rmarkdown::render or
devtools::build_vignettes, it fails when building the package with
devtools::build or R CMD build
given the following error:


Error in eval(x, envir = envir) : object 'child_docs' not found
Warning in readLines(if (is.character(input2)) { :
  cannot open file './child_docs': No such file or directory
Quitting from lines 351-351 (./child_docs)
Error in readLines(if (is.character(input2)) { :
  cannot open the connection
ERROR: installing vignettes failed
* removing 'C:/Users/wolski/AppData/Local/Temp/RtmpIti891/Rinst2cec49ca2170/SRMService'
In R CMD INSTALL


Have a great evening,
Best regards
Witek



-- 
Witold Eryk Wolski



More information about the R-devel mailing list