admin管理员组

文章数量:1123364

I'm creating an R package that used to have tidyverse listed under Depends in the Description file. I was cutting out all unnecessary packages, which was also tidyverse, as i learned, that this package shouldn't be imported in packages. I also got a note, that tidyverse should be moved to Imports, where all the other packages are listed.

However, when i try building the vignette, the code stops due to Error: "Undefined columns selected". I can run all chunks manually without error, but the error occurs as long as tidyverse is not listed under Depends. The error also occurs when having tidyverse listed under Input.


I don't know where the error could be. The traceback from the Knit / R Cmd Check is:

Error in (function (command = NULL, args = character(), error_on_status = TRUE, …: ! System command 'Rcmd.exe' failed

Exit status: 1 stdout & stderr:

Backtrace:

  1. devtools::check(document = FALSE, check_dir = dirname(getwd()))
  2. withr::with_envvar(pkgbuild::compiler_flags(FALSE), action = "prefix", …
  3. base::force(code)
  4. pkgbuild::build(pkg$path, tempdir(), args = build_args, quiet = quiet, …
  5. pkgbuild:::withr_with_makevars(compiler_flags(debug = FALSE), { …
  6. pkgbuild:::withr_with_envvar(c(R_MAKEVARS_USER = makevars_file), { …
  7. base::force(code)
  8. base::force(code)
  9. pkgbuild:::withr_with_temp_libpaths(rcmd_build_tools(options$cmd, c(options$path, …
  10. base::force(code)
  11. pkgbuild::rcmd_build_tools(options$cmd, c(options$path, options$args), …
  12. pkgbuild::with_build_tools({ …
  13. pkgbuild:::withr_with_path(rtools_path(), code)
  14. base::force(code)
  15. base::withCallingHandlers(callr::rcmd_safe(..., env = env, spinner = FALSE, …
  16. callr::rcmd_safe(..., env = env, spinner = FALSE, show = FALSE, …
  17. callr:::run_r(options)
  18. base::with(options, with_envvar(env, do.call(processx::run, c(list(bin, …
  19. base::with.default(options, with_envvar(env, do.call(processx::run, …
  20. base::eval(substitute(expr), data, enclos = parent.frame())
  21. base::eval(substitute(expr), data, enclos = parent.frame())
  22. callr:::with_envvar(env, do.call(processx::run, c(list(bin, args = real_cmdargs, …
  23. base::force(code)
  24. base::do.call(processx::run, c(list(bin, args = real_cmdargs, stdout_line_callback = real_…
  25. (function (command = NULL, args = character(), error_on_status = TRUE, …
  26. base::throw(new_process_error(res, call = sys.call(), echo = echo, …
  27. | base::signalCondition(cond)
  28. (function (e) …
  29. asNamespace("callr")$err$throw(e) Ausführung angehalten

Exited with status 1.


When i have tidyverse listed under Depends I get the note:

Package in Depends field not imported from: 'tidyverse' These packages need to be imported from (in the NAMESPACE file) for when this namespace is loaded but not attached.

Basically my goal is to get the package running without this note. Best case without depending on tidyverse, as this is not reccomended by the authors.

本文标签: rTidyverse in Package Depends ImportsStack Overflow