how can I install earlier versions of shiny r package?

606 views
Skip to first unread message

Jelle Geertsma

unread,
Aug 5, 2014, 8:18:06 AM8/5/14
to shiny-...@googlegroups.com
I Updated my shiny app r package. Now I get handler() and "invalid JSON input" errors. 

I need to run my shiny script soon. Is there a possibility to install older versions of shiny app? Can anyone help me with an url? I know this question could be very 'basic' but I almost never intstalled r packages without using Cran.

Many thanks in advance!

Yihui Xie

unread,
Aug 5, 2014, 2:33:59 PM8/5/14
to Jelle Geertsma, shiny-discuss
You can use devtools::install_version(), but it will be great if you
can make a reproducible example so we can fix the problem.

Regards,
Yihui

Jelle Geertsma

unread,
Aug 5, 2014, 4:21:15 PM8/5/14
to shiny-...@googlegroups.com, jelle.g...@gmail.com
Dear Yihui,
Thank you for your response.

The error went like this: .clientdatError in fromJSON(content, handler, default.size, depth, allowComments,  :   invalid JSON input

I have recently discoverd the cause of the problem. I used in my ui.r file tags like this: tags$textarea(id="text", rows=5, cols=8, "this is a text area")
After removing these tags I can run my shiny app again without errors. I haven't found out yet how to be able to use textareas like these in this newest version of shiny, but I guess if this isn't a bug I somehow will make it work again. 

Are you familiar with this problem with tags like this? Could this unfortenately be a bug?

Kind regards,
Jelle

Yihui Xie

unread,
Aug 5, 2014, 9:22:31 PM8/5/14
to Jelle Geertsma, shiny-discuss
If it is a bug of the latest version of shiny, we will definitely fix
it, but I cannot reproduce the error with this minimal example:

library(shiny)
runApp(list(
ui=fluidPage(tags$textarea(
id="text", rows=5, cols=8, "this is a text area"
)),
server=function(input,output){
observe(print(input$text))
}
))


> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-apple-darwin13.3.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] shiny_0.10.1

loaded via a namespace (and not attached):
[1] bitops_1.0-6 caTools_1.17 digest_0.6.4 htmltools_0.2.4
httpuv_1.3.0
[6] Rcpp_0.11.2 RJSONIO_1.3-0 tools_3.1.1 xtable_1.7-3

Regards,
Yihui

Jelle Geertsma

unread,
Aug 6, 2014, 5:00:59 AM8/6/14
to shiny-...@googlegroups.com, jelle.g...@gmail.com
 I use "shinyUI(pageWithSidebar(" and I put the textarea into a tabPanel() (in a tabsetPanel() in the mainPanel()). could that be something? If not I will look for another potential cause. My shiny code is extensive.
Reply all
Reply to author
Forward
0 new messages