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

the mean within group for ggdensity(gghistogram) missing if data have NA values #1

Closed
chunkaowang opened this issue Feb 17, 2017 · 1 comment

Comments

@chunkaowang
Copy link

In ggdensity(gghistogram) plot, if data have NA values, the mean within group will be missing.

the test code like:
library(ggpubr)
set.seed(1234)
wdata = data.frame(sex = factor(rep(c("F", "M"), each=200)), weight = c(rnorm(200, 55), rnorm(200, 58)))
wdata[1,2] = NA
ggdensity(wdata, x = "weight", add = "mean", rug = TRUE, color = "sex", palette = c("#00AFBB", "#E7B800"))

ggdensity_plot.pdf

kassambara added a commit that referenced this issue Feb 17, 2017
kassambara added a commit that referenced this issue Feb 17, 2017
@kassambara
Copy link
Owner

fixed now! Thanks for reporting this.
Best,
/A

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