I'm creating an R package with a vignette. However, when I try to install the package by using
devtools::install(build_vignettes = TRUE)
an error occurs since it cannot find the file index.html in the doc folder. I thought this file would be automatically created, but apperently something goes wrong here. The error occuring is the following:
"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" --no-site-file --no-environ --no-save --no-restore \
--quiet CMD INSTALL "C:/Users/lnab/AppData/Local/Temp/Rtmpi0XLJ4/mecor_0.1.0.tar.gz" \
--library="\\vf-d2-home/d2home$/lnab/MyDocs/R/win-library/3.4" --install-tests
* installing *source* package 'mecor' ...
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
** help
*** installing help indices
converting help for package 'mecor'
finding HTML links ... done
mecor-package html
uaetrial html
uaetrial_cal html
** building package indices
** installing vignettes
Warning in file(con, "w") :
cannot open file '\\vf-d2-home/d2home$/lnab/MyDocs/R/win-library/3.4/mecor/doc/index.html': No such file or directory
Error in file(con, "w") : cannot open the connection
ERROR: installing vignettes failed
* removing '\\vf-d2-home/d2home$/lnab/MyDocs/R/win-library/3.4/mecor'
* restoring previous '\\vf-d2-home/d2home$/lnab/MyDocs/R/win-library/3.4/mecor'
In R CMD INSTALL
My vignette .Rmd looks like this:
---
title: "Introduction to mecor"
author: "Linda Nab"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Introduction to mecor}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
I never build an R package before but search the internet for a solution for this problem for days but cannot find any. This seems to be the same problem but I cannot find the solution for the problem there. You can find my package here.
Really hope someone could help me!
W://lnab/MyDocs/R/win-library/3.4/mecor
instead of the network share\\vf-d2-home/d2hoem$/...
– Coulombdevtools::install(build_vignettes = TRUE)
– Staggersdevtools::build_vignettes()
(I used this earlier when trying to find a solution for my problem). I guess mapping the network drive together with removing this folder ended up in a solution for my problem. Many thanks! – Doralyn.gitignore
as it was before the bug 2. This:.onLoad()
3. This: Hadley ..Rcheck Moreover, in my case the bug is happening only during the checks and not in the build! – Chlamydeous