Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot launch in RStudio with null data argument #25

Closed
prubin73 opened this issue Oct 6, 2018 · 6 comments
Closed

Cannot launch in RStudio with null data argument #25

prubin73 opened this issue Oct 6, 2018 · 6 comments

Comments

@prubin73
Copy link

prubin73 commented Oct 6, 2018

I've tested both the CRAN and GitHub versions, and the problem exists in both. Running R from a terminal, esquisse::esquisser() works fine (using the default web browser). From an RStudio session, esquisse::esquisser(some_data_frame) works as expected, but esquisse::esquisser() throws an error:

Error in if (is.null(data) && defaultData %in% ls(pos = globalenv())) { :
missing value where TRUE/FALSE needed

RStudio version: 1.1.456 
Session information:
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Linux Mint 18.3

Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.19       pillar_1.3.0       compiler_3.4.4     RColorBrewer_1.1-2
 [5] later_0.7.5        plyr_1.8.4         bindr_0.1.1        shinyWidgets_0.4.3
 [9] tools_3.4.4        digest_0.6.17      jsonlite_1.5       tibble_1.4.2      
[13] gtable_0.2.0       pkgconfig_2.0.2    rlang_0.2.2        shiny_1.1.0       
[17] rstudioapi_0.8     yaml_2.2.0         bindrcpp_0.2.2     dplyr_0.7.6       
[21] stringr_1.3.1      grid_3.4.4         tidyselect_0.2.4   glue_1.3.0        
[25] R6_2.3.0           ggplot2_3.0.0      purrr_0.2.5        magrittr_1.5      
[29] scales_1.0.0       promises_1.0.1     ggthemes_4.0.1     htmltools_0.3.6   
[33] assertthat_0.2.0   xtable_1.8-3       esquisse_0.1.5.900 mime_0.6          
[37] colorspace_1.3-2   httpuv_1.4.5       stringi_1.2.4      miniUI_0.1.1.1    
[41] lazyeval_0.2.1     munsell_0.5.0      crayon_1.3.4    
@pvictor
Copy link
Member

pvictor commented Oct 7, 2018

Hello,
I've made some changes, can you intall dev version and retry ?

devtools::install_github("dreamRs/esquisse")

Victor

@prubin73
Copy link
Author

prubin73 commented Oct 7, 2018

The new version fails with a different error:

Error in if (nzchar(context_select)) { : argument is of length zero

Again, it launches fine when running R in a terminal, but fails when in RStudio.

@prubin73
Copy link
Author

prubin73 commented Oct 7, 2018

I've been running the command (unsuccessfully) in the RStudio console. I discovered (through a bunch of experiments you don't care about) that having a file of any type (even an empty text file) open in the RStudio editor lets the command run successfully in the console. If I close all open files, the command fails again.

@pvictor
Copy link
Member

pvictor commented Oct 7, 2018

Thanks for all your experiments. I think it's related to rstudioapi, which version do you have ? I have 0.7, maybe try to update.

I've added a call to isTRUE so that the condition don't fail, just in case.

Victor

@prubin73
Copy link
Author

prubin73 commented Oct 7, 2018

I have version 0.8 of rstudioapi.

Your latest patch seems to have fixed it for me. Thanks! I'll leave it up to you to close the ticket or not.

Paul

@pvictor
Copy link
Member

pvictor commented Oct 7, 2018

Oups, I'm the one who's not up to date. And now I can reproduce your error ! Definitely linked to rstudioapi. Thanks for the report !

Victor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants