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 plot categorical data #33

Open
wcerfgba opened this issue Jan 25, 2022 · 0 comments
Open

Cannot plot categorical data #33

wcerfgba opened this issue Jan 25, 2022 · 0 comments

Comments

@wcerfgba
Copy link

Hello,

I am trying to use scatterpie with categorical x and y variables but I get the following error when I try:

Error in r[i1] - r[-length(r):-(length(r) - lag + 1L)] : 
  non-numeric argument to binary operator

Here is a minimal reproducible example:

data <- data.frame(
  x = sample(c('a', 'b', 'c'), 10, replace = TRUE),
  y = sample(c('t', 'u', 'v'), 10, replace = TRUE),
  m = rnorm(10),
  n = rnorm(10)
)
ggplot() +
  geom_scatterpie(
    aes(
      x = x,
      y = y
    ),
    data = data,
    cols = c(m, n)
  )

I have seen two other issues about this (#2 and #13) but I don't see any example in the vignette: all examples in the vignette are continuous lat and long x/y.

Thanks!

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

1 participant