Skip to content

Error in #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
xavidp opened this issue May 9, 2023 · 8 comments
Closed

Error in #2

xavidp opened this issue May 9, 2023 · 8 comments

Comments

@xavidp
Copy link
Contributor

xavidp commented May 9, 2023

Hi, and thanks for creating this package.

I need to create some course content, and I'm reviewing your package to see whether I want to follow the route of the learnr package, or something different (since content will end up in a Moodle environment).

When clicking at "Run Document" on the first hello-world tutorial I'm tweaking, I get, errors like:

Listening on http://127.0.0.1:3364
Warning: Error in write_answers: could not find function "write_answers"
  3: <Anonymous>
  1: rmarkdown::run
Warning: Error in write_answers: could not find function "write_answers"
  3: <Anonymous>
  1: rmarkdown::run
(...)

every time I click at the buttons to download the answers (any of them: "Download RDS", "Download HTML" or "Download PDF"). the dialogue to download the file is shown, but no file is saved on disk indeed.

Hope this helps

@davidkane9
Copy link
Contributor

Apologies for the delay in responding. Are you using the CRAN version?

@davidkane9
Copy link
Contributor

Ahh. I think you need to include library(tutorial.helpers) in your tutorial Rmd file, just as you need to include library(learnr).

@xavidp
Copy link
Contributor Author

xavidp commented May 12, 2023

Hi David, and thanks for your fedback.

It might be something else, since both packages are included in the first chunks of that Rmd file (I cloned one of the examples, trying to tweak just a few things just as some sort of hello-world approach)

I exposed my simple tweak in a Rmd file here:
https://gitlab.com/xavidp/curs-r-basic/-/blob/main/inst/tutorials/r_basic_sessio_01/tutorial.Rmd

@davidkane9
Copy link
Contributor

You're right! I can replicate this error. Will fix now.

@davidkane9
Copy link
Contributor

Should be fixed. Can you please:

remove.packages("tutorial.helpers")
remotes::install_github("PPBDS/tutorial.helpers")

And try again?

@xavidp
Copy link
Contributor Author

xavidp commented May 12, 2023

Awesome, that was a fast fix! The three buttons became functional after this last commit.
In my case, where I'm using "renv", I installed (after removal) with the equivalent function:

renv::install("PPBDS/tutorial.helpers")

(which is even shorter, btw, plus allowing better reproducibility across machines/os/environments, etc)

@xavidp xavidp closed this as completed May 12, 2023
@davidkane9
Copy link
Contributor

Nice! By the way, you are my first user. I am eager for any feedback/requests you might have! dave.kane at gmail

@xavidp
Copy link
Contributor Author

xavidp commented May 23, 2023

Great, thanks David. Btw, I added a request already, to the other package :-) :

How to contribute translations to these nice tutorials you are doing
PPBDS/r4ds.tutorials#19

Best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants