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

Bug: error where numeric x_var & facet_scales = "free" #441

Open
davidhodge931 opened this issue Mar 30, 2022 · 2 comments
Open

Bug: error where numeric x_var & facet_scales = "free" #441

davidhodge931 opened this issue Mar 30, 2022 · 2 comments

Comments

@davidhodge931
Copy link
Contributor

library(simplevis)
library(palmerpenguins)

gg_point_facet(penguins, 
               x_var = bill_length_mm, 
               y_var = body_mass_g, 
               facet_var = species, 
               facet_scales = "free")
@davidhodge931
Copy link
Contributor Author

delete warning
add args
add param doc

if (is.logical(y_var_vctr)) {
data <- data %>%
dplyr::mutate(dplyr::across(!!y_var, ~factor(.x, levels = c("TRUE", "FALSE"))))

y_var_vctr <- dplyr::pull(data, !!y_var)

}

if (is.character(y_var_vctr) | is.factor(y_var_vctr)) {
if (y_rev == FALSE) {
data <- data %>%
dplyr::mutate(dplyr::across(!!y_var, ~forcats::fct_rev(.x)))
}

y_var_vctr <- dplyr::pull(data, !!y_var)

}

Then copy and paste long x/y scale code

@davidhodge931
Copy link
Contributor Author

add *_na_rm

@davidhodge931 davidhodge931 changed the title facet_scales = "free" bugs out where numeric x_var Bug: error where numeric x_var & facet_scales = "free" Jun 3, 2022
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