The tutorials all work before I build the package, but afterwards one of the tutorials fails when run with learnr::run_tutorial(). It also fails when run from the tutorials tab.
remotes::install_github("Bio302-UiB/data-handling")
> learnr::run_tutorial("text-manipulation", package = "data.handling")
processing file: text-manipulation.Rmd
...
|................................ | 66%
label: replace-tibble
Quitting from lines 284-288 (text-manipulation.Rmd)
Error: Problem with `mutate()` input `species`.
x unused argument (string = species)
ℹ Input `species` is `str_replace(string = species, pattern = "_", replacement = " ")`.
This should put learnr::run_tutorial() in a clean / fresh background R process. This will isolate the learnr::run_tutorial() call from your local environment (which will behave very similar to the blue knit button or a deployed tutorial.)
Thanks for the suggestion. I tried it and unfortunately I still get the same error.
Some colleagues have also tried the tutorial and get the same error (different versions of Rstudio, Linux and Mac).
Curiously, if I only get the error when I install from github (with either remotes or renv). When I install with the Install and restart button on the build tab in rstudio, everything works fine.
I've had a similar thing happen this week. I made a set of tutorials for a class that I'm teaching and put them into a package. I tested the tutorials locally and they worked perfectly. When the same tutorials are run from the package they fail (the exercise checker isn't seeing the setup stuff)
My students have found the same thing - they can't run the tutorials from the package but are able to run the markdown files and use the tutorials with no issue. I'd be interested if there is a solution to this!