building tutorial with learnr and gradethis

I have built a learnr tutorial. It resides on Github.
Here is the access:

devtools::install_github("DataScienceProjectsJapan/TidyverseTutorials")

I tried running it in a fresh project in RStudio cloud. When I go to the Tutorials panel, it shows up there but when I try to run it, I get this error message

Quitting from lines 12-18 (tidyTut.Rmd)
Error: package or namespace load failed for 'gradethis':
 .onLoad failed in loadNamespace() for 'gradethis', details:
  call: (function (exercise.cap = "Code", exercise.eval = FALSE, exercise.timelimit = 30, 
  error: unused argument (exercise.error.check.code = "gradethis_error_checker()")
Execution halted

The code from lines 11-18 are


```{r setup, include=FALSE}
library(learnr)
library(gradethis)
tutorial_options(exercise.checker = gradethis::grade_learnr)
knitr::opts_chunk$set(echo = FALSE)
library(tidyverse)
library(nycflights13)

I checked my Description file and at the end it does reference gradethis (twice)

Imports: 
    dplyr,
    ggplot2,
    gradethis (>= 0.2.3.9001),
    learnr,
    nycflights13,
    plot3D,
    tibble
Remotes: 
    rstudio-education/gradethis
Depends: 
    tidyverse

Can anyone suggest what is wrong?

The problem is most likely that gradethis requires the development version of learnr and according to your DESCRIPTION file the CRAN version is being installed. You can add rstudio/learnr to your Remotes section (and note that the repository for gradethis has moved).

Remotes:
    rstudio/gradethis
    rstudio/learnr
1 Like

Hi. Thank you. Do I need to remove these from Imports?
gradethis (>= 0.2.3.9001),
learnr,

And I don't understand what you meant by (and note that the repository for gradethis has moved)

Hello. I just added what you suggested and it works so ignore my previous message.
Many thanks!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.