-
Notifications
You must be signed in to change notification settings - Fork 182
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
Possible bug in ggscatterstats #96
Comments
Correct me if I am wrong, but it's not failing. There are just no labels to show because there are no movies with library(ggstatsplot)
library(dplyr)
distinct(movies_long, title, year, .keep_all = TRUE) %>%
filter(budget > 150 & length < 60)
#> # A tibble: 0 x 8
#> # ... with 8 variables: title <fct>, year <int>, length <int>,
#> # budget <dbl>, rating <dbl>, votes <int>, mpaa <fct>, genre <fct> If you choose a different expression, it works- library(ggstatsplot)
library(dplyr)
ggscatterstats(
data = distinct(movies_long, title, year, .keep_all = TRUE),
x = length,
y = budget,
label.expression = "budget > 100 & length > 150",
label.var = "title"
)
#> Warning: This plot can't be further modified with `ggplot2` functions.
#> In case you want a `ggplot` object, set `marginal = FALSE`.
#> |
Oh my. My brain is slow today. The problem from going from English to
logic. You are correct I really wanted `"budget > 150 | length < 60"`
looking at `ggstatsplot:::yuend_ci` now
…On Wed, Dec 5, 2018 at 10:54 AM Indrajeet Patil ***@***.***> wrote:
Correct me if I am wrong, but it's not failing. There are just no labels
to show because there are no movies with budget > 150 *and* length < 60.
library(ggstatsplot)
library(dplyr)
distinct(movies_long, title, year, .keep_all = TRUE) %>%
filter(budget > 150 & length < 60)#> # A tibble: 0 x 8#> # ... with 8 variables: title <fct>, year <int>, length <int>,#> # budget <dbl>, rating <dbl>, votes <int>, mpaa <fct>, genre <fct>
If you choose a different expression, it works-
library(ggstatsplot)
library(dplyr)
ggscatterstats(
data = distinct(movies_long, title, year, .keep_all = TRUE),
x = length,
y = budget,
label.expression = "budget > 100 & length > 150",
label.var = "title"
)#> Warning: This plot can't be further modified with `ggplot2` functions.#> In case you want a `ggplot` object, set `marginal = FALSE`.#>
<https://camo.githubusercontent.com/c1cc61dec6909f305fa754de3df63c6c95fadc13/68747470733a2f2f692e696d6775722e636f6d2f4b35767841696f2e706e67>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#96 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AZU62SiPG3UDUlKTCBiHl2fpNn9WYU87ks5u1-wngaJpZM4ZC_f->
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
label.expression
works for single conditions but seems to fail silently for a joint condition. See reprex (sorry for some reason on my machine it's only rendering the final plot but I assure you the first two are working.Created on 2018-12-05 by the reprex package (v0.2.1)
The text was updated successfully, but these errors were encountered: