cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
443
Views
0
Helpful
1
Replies

How do I get R-markdown webex package working correctly?

Bahirakira
Level 1
Level 1

I am hoping to use the "webex" package from PsyLearnR in my R-Markdown file but it doesn't seem to be working properly.

This is my set-up block:

knitr::opts_chunk$set(echo = TRUE)
if (!requireNamespace("webex")) {
  stop("You must have the 'webex' package installed to knit HTML from this template.\n   devtools::install_github(\"PsyTeachR/webex\")")
} else {
  library("webex")
}
library("tidyverse")
library("exams")
style_widgets(correct = "green")

Then, within the rmd-to-be-html document, an example of trying to use webex:

So, let's say we have 50 atoms we are watching and the rate of decay is 0.167 atoms every hour.

In the first hour, how many atoms do you expect to decay? `r fitb(8.333, num = TRUE, ignore_ws = TRUE, tol = 0.7, regex = TRUE)`
`r hide("Explanation")` 8.333 but, we can't have a third of an atom! So, let's say 8 or 9. `r unhide()`

This then renders as a html file that looks like this:

8LLNV.png

But, as you can see, the hide/unhide button isn't working and nothing happens if I type "8" into the text box.

What am I getting wrong? Will this work if it is hosted on a site/made live? Any suggestions would be great!

[This is for a project to be used with students and I really don't want to use r-exams or learnr]

1 Reply 1

Hi BahirAkira, I have this problem too, If you Get your answer then let me know the solution too. Kindly mention me in solution Thanks in Advance. OLANSI