I wrote an internal package and when I add a vignette, it does not pass devtools:check()
anymore. I added the vignette with devtools::use_vignette("my-vignette")
.
Even if I do not change anything about the vignette template, running devtools::check()
yields:
==> devtools::check()
Updating DataReportR documentation
Loading DataReportR
Setting env vars --------------------------------------------------------------
CFLAGS : -Wall -pedantic
CXXFLAGS: -Wall -pedantic
Building DataReportR ----------------------------------------------------------
"C:/PROGRA~1/R/bin/x64/R" --no-site-file --no-environ --no-save --no-restore \
--quiet CMD build "C:\Daten\svn\R_Pakete\DataReportR" --no-resave-data \
--no-manual
* checking for file 'C:\Daten\svn\R_Pakete\DataReportR/DESCRIPTION' ... OK
* preparing 'DataReportR':
* checking DESCRIPTION meta-information ... OK
* installing the package to build vignettes
-----------------------------------
* installing *source* package 'DataReportR' ...
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error in namespaceExport(ns, exports) :
undefined exports: create_var_details, create_var_overview
Error: loading failed
Execution halted
ERROR: loading failed
Here an example from one of the functions mentioned in the error above (the contents of the function do not matter; the same error occurs even if the function is empty):
#' Create the variable overview section for your data report
#'
#' @param var_details_xlsx character. Path including file name to the xlsx file which contains all variable information.
#' @param tex_file character. Path including file name to the tex file to be created.
#' @param replace logical. Choose 'FALSE' to prevent tex files from beeing replaced.
#'
#' @importFrom readr write_file
#' @importFrom readxl read_xlsx
#' @importFrom dplyr arrange select mutate
#' @importFrom xtable sanitize xtable
#' @importFrom magrittr %>%
#' @importFrom utils capture.output
#'
#' @export
create_var_overview <- function(var_details_xlsx, tex_file, replace = TRUE) {
...
}