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

Parallel plot via passing a vector of column names not working #566

Open
AdrianAntico opened this issue Sep 6, 2023 · 0 comments
Open

Comments

@AdrianAntico
Copy link

It looks like the function was setup to accept a character vector of column names but tidyselect updated it's api so an error is being thrown... Looks like the suggested method should make for a quick fix. Instead of using data %>% select(v) you would now use data %>% select(all_of(v))

# Website version start 
df <- data.frame(
  price = rnorm(5, 10),
  amount = rnorm(5, 15),
  letter = LETTERS[1:5]
)

df |>
  e_charts() |>
  e_parallel(price, amount, letter, opts = list(smooth = TRUE))

# Website version end

# Test out passing in vector of names
df <- data.frame(
  price = rnorm(5, 10),
  amount = rnorm(5, 15),
  letter = LETTERS[1:5]
)

v <- c("price","amount","letter")

df |>
  e_charts() |>
  e_parallel_(v, opts = list(smooth = TRUE))

Warning message:
  Using an external vector in selections was deprecated in tidyselect 1.1.0.Please use `all_of()` or `any_of()` instead.
# Was:
data %>% select(v)

# Now:
data %>% select(all_of(v))

See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
This warning is displayed once every 8 hours.
Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated.
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