Can you avoid running the code entered in a learnr exercise?

  • I am writing some learnr exercises on installing and loading packages. Because I'm installing and loading packages, I just want to check the learners' code but not actually run the code. Is it possible to submit but not run the entered code? I tried eval = FALSE in the code chunk, but it still runs the code.
  • Relatedly, is it possible to hide the Run Code button in these cases?

How about using question_text() for these, would that accomplish what you're hoping to do since you want to check the text they write but not actually run the code?

Brilliant--thanks so much! And thanks for the super speedy response!

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.