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

'Index out of bound' when trying to 'View()' the plot associated list #317

Closed
lucavd opened this issue Dec 16, 2022 · 1 comment
Closed

Comments

@lucavd
Copy link

lucavd commented Dec 16, 2022

Hi @thomasp85 ,

I think there's a bug (maybe related to #217).

library(ggplot2)
library(patchwork)

p1 = ggplot(mtcars, aes(x = factor(cyl), y = mpg)) + geom_violin()
p2 = ggplot(mtcars, aes(x = factor(cyl), y = mpg)) + geom_boxplot()
p = p1 + p2
str(p, max.level = 1)

But

> View(p)
Error: Index out of bounds

I tried on different machines and different OS (even server) and different RStudio versions. Same error
patchwork version 1.1.2 from CRAN

@mschilli87
Copy link

I get

Error in as.data.frame.default(x) :
  cannot coerce class ‘c("patchwork", "gg", "ggplot")’ to a data.frame
  • R version: 4.2.2 (2022-10-31)
  • patchwork: 1.1.2

🤷

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