aaronrkaufman / shinySurveys

Code to produce a variety of R Shiny surveys
13 stars 17 forks source link

Errors running surveys #1

Open isaactpetersen opened 3 years ago

isaactpetersen commented 3 years ago

Thank you very much for your development of this package. I tried to clone the repo to implement the example surveys you developed and am running into a few errors:

When I try to run the audience_costs app, I receive the following error after answering a few questions:

> shiny::runApp('audience_costs')

Listening on http://127.0.0.1:6204
[1] "Initializing..."
       pid      vote2        reg        mot        pow        res      treat    outcome 
"Democrat"         ""         ""         ""         ""         ""         ""         "" 
[1] 2
       pid      vote2        reg        mot        pow        res      treat    outcome 
"Democrat"      "Yes"         ""         ""         ""         ""         ""         "" 
[1] 3
Warning in gzfile(file, "rb") :
  cannot open compressed file 'droptoken.rds', probable reason 'No such file or directory'
Warning: Error in gzfile: cannot open the connection
  115: gzfile
  114: readRDS
  113: <reactive:dynamicUi> [D:\Documents\GitHub\shinySurveys\audience_costs/server.R#133]
   97: dynamicUi
   96: renderUI [D:\Documents\GitHub\shinySurveys\audience_costs/server.R#98]
   95: func
   82: renderFunc
   81: output$MainAction
    1: shiny::runApp

It appears that it is looking for the file 'droptoken.rds', but it does not exist in the repo. I receive a similar error in the media_bias app:

> runApp('media_bias')

Listening on http://127.0.0.1:4418
Loading required package: tm
Warning: package ‘tm’ was built under R version 4.0.5
Loading required package: NLP
Warning: package ‘NLP’ was built under R version 4.0.3
Loading required package: openNLP
Warning: package ‘openNLP’ was built under R version 4.0.3
Error: package or namespace load failed for ‘openNLP’:
 .onLoad failed in loadNamespace() for 'rJava', details:
  call: fun(libname, pkgname)
  error: JAVA_HOME cannot be determined from the Registry
Warning in gzfile(file, "rb") :
  cannot open compressed file 'droptoken.rds', probable reason 'No such file or directory'
Warning: Error in gzfile: cannot open the connection
  51: gzfile
  50: readRDS
Error in gzfile(file, "rb") : cannot open the connection

When running the compactness app, I receive the following error:

> shiny::runApp('compactness')
Loading required package: shiny

Listening on http://127.0.0.1:4418
Warning: package ‘shinyjqui’ was built under R version 4.0.5
Warning: package ‘shinyjs’ was built under R version 4.0.5
Need Shiny help? I'm available for consulting:
    https://attalitech.com

Attaching package: ‘shinyjs’

The following object is masked from ‘package:shiny’:

    runExample

The following objects are masked from ‘package:methods’:

    removeClass, show

Warning: Error in includeJqueryUI: could not find function "includeJqueryUI"
  75: dots_list
  74: div
  72: fluidPage

I have installed shinyjqui, so I'm not sure why I'm receiving this error.

I receive the following error after answering a few questions in the info_battery app:

> runApp('info_battery')

Listening on http://127.0.0.1:4418

Attaching package: ‘rsconnect’

The following object is masked from ‘package:shiny’:

    serverInfo

Warning: package ‘digest’ was built under R version 4.0.3
Warning: package ‘shinyBS’ was built under R version 4.0.5
Warning: package ‘rdrop2’ was built under R version 4.0.5
Warning: package ‘catSurv’ was built under R version 4.0.5
Loading required package: ltm
Loading required package: MASS
Loading required package: msm
Loading required package: polycor
## 
## Support provided by the U.S. National Science Foundation 
## (Grant SES-1558907) 
##
[1] 1
[1] "Initializing..."
[1] 2
       pid      vote2       npi1       npi2       npi3       npi4       npi5      score 
"Democrat"         ""         ""         ""         ""         ""         ""         "" 
[1] 3
       pid      vote2       npi1       npi2       npi3       npi4       npi5      score 
"Democrat"      "Yes"         ""         ""         ""         ""         ""         "" 
[1] 4
Warning: Error in validObject: invalid class “Cat” object: slots in class definition but not in object: "ids"
  1: runApp

When running the rollcall_lookup app, I receive the following error:

> shiny::runApp('rollcall_lookup')
Loading required package: shiny

Listening on http://127.0.0.1:4306

Attaching package: ‘rsconnect’

The following object is masked from ‘package:shiny’:

    serverInfo

[1] "Initializing..."
 [1] "Democrat" NA         NA         NA         NA         NA         NA         NA         NA         NA         NA         NA        
[13] NA         NA         NA         NA         NA         NA         NA         NA        
[1] 2
[1] "Finished with covariates"
Warning: Error in geocode: could not find function "geocode"
  1: shiny::runApp

I'm not sure which package to install for the geocode() function.

Here's my sessionInfo():

> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

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

other attached packages:
 [1] tm_0.7-8         NLP_0.2-1        catSurv_1.3.0    ltm_1.1-1        polycor_0.7-10   msm_1.6.8        MASS_7.3-53.1    shinyjqui_0.4.0 
 [9] shinyjs_2.0.0    rdrop2_0.8.2.1   blockTools_0.6-3 shinyBS_0.61     digest_0.6.27    rsconnect_0.8.17 curl_4.3         shiny_1.6.0     

loaded via a namespace (and not attached):
 [1] bslib_0.2.4        slam_0.1-48        splines_4.0.2      lattice_0.20-41    vctrs_0.3.7        expm_0.999-6       htmltools_0.5.1.1 
 [8] utf8_1.2.1         survival_3.2-10    rlang_0.4.10       jquerylib_0.1.3    later_1.1.0.1      pillar_1.5.1       withr_2.4.1       
[15] fortunes_1.5-4     lifecycle_1.0.0    plyr_1.8.6         htmlwidgets_1.5.3  mvtnorm_1.1-1      fastmap_1.1.0      httpuv_1.5.5      
[22] parallel_4.0.2     fansi_0.4.2        Rcpp_1.0.6         xtable_1.8-4       promises_1.2.0.1   cachem_1.0.4       RcppParallel_5.0.3
[29] jsonlite_1.7.2     mime_0.10          grid_4.0.2         tools_4.0.2        magrittr_2.0.1     sass_0.3.1         tibble_3.1.0      
[36] crayon_1.4.1       pkgconfig_2.0.3    ellipsis_0.3.1     Matrix_1.3-2       xml2_1.3.2         httr_1.4.2         rstudioapi_0.13   
[43] R6_2.5.0           compiler_4.0.2

Thanks very much in advance!

aaronrkaufman commented 3 years ago

Thanks for pointing these out! I'm not actively maintaining this repo, but if there are particular applications you'd like to get up and running, I am happy to help out.

-Regarding droptoken.rds, this is an object that you'll create on your own such that the results from the Shiny survey are automatically uploaded to your Dropbox folder.

-Regarding the shinyjqui issue, I'm not so sure what to tell you here: the CRAN link to that seems dead (https://rdrr.io/cran/shinyjqui/src/R/includeJqueryUI.R). My guess is that function has been deprecated and there is a new one.

-Regarding the info_battery error, it looks like the new version of catsurv changed some things.

-Regarding the rollcall_lookup error, that is from the ggmap library -- I've just made some changes to make that clearer.