2

I have developed a shiny app in which I use the function exams2blackboard from the R/exams package. I installed the package from http://R-Forge.R-project.org. When I go to publish it on shinyApps.io I receive the following error:

Error: Unhandled Exception: Child Task 980776811 failed: Error building image: Error fetching exams (2.4-0) source. unable to satisfy package: exams (2.4-0)

Note: I used the R/exams version 2.4-0 from http://R-Forge.R-project.org following the recommendation at Blackboard not importing Blackboard.zip

Ruben
  • 31
  • 3
  • How does shinyapps.io try to install the package? Ur seems like it tries to build the package first... – Achim Zeileis Jul 29 '21 at 19:04
  • Sorry for my ignorance, but I do not understand the question. In R Studio I select to publish it in my account in shinyApps.io, and everything runs automatically – Ruben Jul 30 '21 at 09:04
  • I'm not a shinyapps.io user but I guess you will need to tell the server somehow where to find the exams package (or rather the required version of it). I don't know how this is done and hence it is hard to guess why this goes wrong. Any pointers might help... – Achim Zeileis Jul 30 '21 at 18:17
  • Version 2.4-0 of R/exams has finally been published on CRAN. – Achim Zeileis Oct 17 '22 at 12:11

1 Answers1

1

Chapter 2.4 of the shinyapps.io user guide at https://docs.rstudio.com/shinyapps.io/getting-started.html#using-your-r-packages-in-the-cloud says:

Currently, the shinyapps.io service supports deploying packages installed from CRAN, GitHub (both public and private repos), and BioConductor.
[...]
Support for R-Forge and other repos is on our backlog; please drop us a line in the shinyapps.io Community if the lack of support is a blocker for you.

Hence my interpretation is that you cannot install the R-Forge version easily. Possibly, you can install it from the R-Forge mirror on GitHub, though: https://github.com/r-forge/exams/tree/master/pkg/exams

Achim Zeileis
  • 15,710
  • 1
  • 39
  • 49
  • Following your recommendation I tried to install the package from GitHub with `install_github("r-forge/exams")` and I got this message: Error: Failed to install 'exams' from GitHub: Does not appear to be an R package (no DESCRIPTION) – Ruben Jul 31 '21 at 21:37
  • The `exams` project on R-Forge contains several packages plus the web page, so you need to indicate the correct sub-directory: `install_github("r-forge/exams/pkg/exams")`. This should work in principle but for me the donwload timed out because it first needs to download the entire repository. Not sure if there is a way around it. I would recommend reaching out to the shinyapps.io community as recommended in the documentation (and then report the results back here). – Achim Zeileis Aug 01 '21 at 17:17
  • `install_github("r-forge/exams/pkg/exams")` worked fine for me. I was able to deployed the script. However, when running the app, I got an error that I do not get when the app is run locally. That error was also found previously with the function exams2pdf ([https://community.rstudio.com/t/error-in-deployed-app-disconnected-from-the-server/21894](https://community.rstudio.com/t/error-in-deployed-app-disconnected-from-the-server/21894)). I will try to figure out the reason. – Ruben Aug 16 '21 at 07:13
  • Thanks for the follow-up! Internally, all `exams2xyz` interfaces ultimately call `xexams` which tries to record the call stack, e.g., `exams2nops` calls `exams2pdf` which calls `xexams`. Therefore, `xexams` internally uses the command `match.call(definition = sys.function(i), call = sys.call(i))`. Apparently, the `sys.function` returns a value that is not a valid input for `match.call(definition = ...)`. If you can find out what value is used (and possibly why), I can try to fix this. So far I couldn't replicate the problem on my end. – Achim Zeileis Aug 16 '21 at 14:03
  • @Ruben Did you figure out a solution for this question? If so it would be great if we could resolve this open question here on SO. Thanks! – Achim Zeileis Sep 10 '21 at 18:02
  • I am afraid not. I tried but my skills are not good enough. The only thing that worked for me was to eliminate that piece of the code from the xexams function... The code run in that way in shinyapps.io, but I suppose it is a bad solution. So I keep running the package locally, which works fine for me – Ruben Sep 12 '21 at 06:09
  • We will try to get version 2.4-0 to CRAN in the next weeks... that will also resolve the problem. Sorry for the inconvenience. – Achim Zeileis Sep 12 '21 at 14:21
  • Not at all. Thanks for all your help. You will see that I have added a comment in another question I posted related with this package. I hope it helps – Ruben Sep 15 '21 at 13:02
  • 1
    @Ruben, I wonder if you finish your implementation. I also want to know how to include R-exams questions in a Shiny app. In my case, I wonder how to do it dynamically: I mean, during an evaluation (and according to the previous student's answers) I need the app can decide which question will be the next one to be solved by this particular student. In other words, the Computer Adaptive Testing idea. Thanks for sharing your results. – Eduardo-Uresti Jul 18 '22 at 18:14