This is a very specific question.
I have a simple Shiny app, using the latest version of R (3.2.2), RStudio (0.99.473), all packages up-to-date, tested in both Windows 7 and Ubuntu 14.04. The same thing happens in both SOs.
I have a library of functions which I embedded in a "package", with a properly created DESCRIPTION file. I use devtools to load this package. So, the first lines of code in my very simple Shiny app are
library("devtools")
load_all("../../RTEMP");
Since I plan to use some of these functions within the Shiny app. The package name is not actually RTEMP, I created this temporarily in order to isolate the problem. This temporary package has one single file inside RTEMP/R/, something.r. This file contains one line of code:
AA <- setRefClass("AA");
So I am creating a reference class with nothing but a name (my original code relies on R objects of this type). I am not doing anything with the package, simply loading it.
When running the Shiny app for the first time after opening RStudio, it works fine. If I close the app and open it again, I get the following error message:
ERROR: shinyjs: you cannot mix named and unnamed arguments in the same function call
Curiously, if I change the beginning of my Shiny app to this:
#library("devtools")
#load_all("../../RTEMP");
AA <- setRefClass("AA");
So, commenting the package loading and setting the reference class inside the Shiny app, everything works fine.
The problem happens when I call setRefClass from within a package loaded with devtools, but not when I call it directly from Shiny. Also, I can load it the first time, but not the second (the Shiny Window simply shows the error message above).
Any ideas what may be causing this bug?
Thank you very much.