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

R-devel: Error in grid.Call.graphics(C_setviewport, vp, TRUE) : VECTOR_ELT() can only be applied to a 'list', not a 'double' #3217

Closed
HenrikBengtsson opened this issue Mar 29, 2019 · 3 comments

Comments

@HenrikBengtsson
Copy link

@HenrikBengtsson HenrikBengtsson commented Mar 29, 2019

Disclaimer: This might be related to recent R-devel updates, e.g. r76285, or not. It looks related to the 'grid' package but could be ggplot2 specific too - I don't have time to troubleshoot this further. I could not reproduce it running a few of grid's examples but I only tried so many. I discovered it downstream from ggplot2 and reporting upstream as far as I could track down a reproducible example. By posting it here, I hope to cut the corners for some people who are soon to discover the same problem.

$ R --vanilla
R Under development (unstable) (2019-03-29 r76295) -- "Unsuffered Consequences"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
[...]
> ggplot2::qplot(1:3)
Registered S3 methods overwritten by 'ggplot2':
  method         from 
  [.quosures     rlang
  c.quosures     rlang
  print.quosures rlang
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
Error in grid.Call.graphics(C_setviewport, vp, TRUE) : 
  VECTOR_ELT() can only be applied to a 'list', not a 'double'

> traceback()
16: grid.Call.graphics(C_setviewport, vp, TRUE)
15: push.vp.viewport(X[[i]], ...)
14: FUN(X[[i]], ...)
13: lapply(vps, push.vp, recording)
12: pushViewport(vp, recording = FALSE)
11: pushgrobvp.viewport(x$vp)
10: pushgrobvp(x$vp)
9: pushvpgp(x)
8: preDraw.gTree(x)
7: preDraw(x)
6: drawGTree(x)
5: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
4: grid.draw.gTree(gtable)
3: grid.draw(gtable)
2: print.ggplot(x)
1: (function (x, ...) 
   UseMethod("print"))(x)

Session info

> sessionInfo()
R Under development (unstable) (2019-03-29 r76295)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.2 LTS

Matrix products: default
BLAS:   /home/hb/software/R-devel/trunk/lib/R/lib/libRblas.so
LAPACK: /home/hb/software/R-devel/trunk/lib/R/lib/libRlapack.so

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] labeling_0.3     colorspace_1.4-1 scales_1.0.0     compiler_3.7.0  
 [5] plyr_1.8.4       lazyeval_0.2.2   pillar_1.3.1     gtable_0.3.0    
 [9] tibble_2.1.1     crayon_1.3.4     Rcpp_1.0.1       ggplot2_3.1.0   
[13] grid_3.7.0       pkgconfig_2.0.2  rlang_0.3.3      munsell_0.5.0  
@HenrikBengtsson
Copy link
Author

@HenrikBengtsson HenrikBengtsson commented Mar 29, 2019

Argh... forgot to look at Closed Issues. Already answered/addresses in Issue #3215. Sorry for the noise.

@yutannihilation
Copy link
Member

@yutannihilation yutannihilation commented Mar 30, 2019

Thanks for the notice anyway!

@lock
Copy link

@lock lock bot commented Sep 26, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Sep 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants