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

median_hilow broken in stat_summary examples #1520

Closed
smouksassi opened this issue Jan 26, 2016 · 9 comments
Closed

median_hilow broken in stat_summary examples #1520

smouksassi opened this issue Jan 26, 2016 · 9 comments
Labels
bug an unexpected problem or unintended behavior
Milestone

Comments

@smouksassi
Copy link

many examples involving hmisc functions just does not work as is:
http://docs.ggplot2.org/current/stat_summary.html
It is not clear whether support for hmisc functions is still planned if yes we need a fix.

@hadley
Copy link
Member

hadley commented Jan 26, 2016

Already fixed in dev: http://docs.ggplot2.org/dev/stat_summary.html

@hadley hadley closed this as completed Jan 26, 2016
@hadley
Copy link
Member

hadley commented Jan 26, 2016

Can you please create a reproducible example that I can easily copy and paste into R?

@hadley
Copy link
Member

hadley commented Jan 26, 2016

Also, please don't provide sessionInfo() unless explicitly asked - it just clutters the display.

@hadley
Copy link
Member

hadley commented Jan 26, 2016

Could you please make your example more minimal, and use ````R` to make an R code block?

@smouksassi
Copy link
Author

library(ggplot2)
require(nlme)# for data Theoph  Oxboys

stat_sum_df <- function(fun, geom="smooth", ...) {
  stat_summary(fun.data=fun,  geom=geom,  ...)
}
ggplot(Oxboys ,aes(round(age,1),height))+
  geom_line(aes(group=Subject))+
  geom_point()+
  stat_sum_df("median_hilow",geom =
"smooth",col="red",fill="red",alpha=0.1,size=2)

@hadley
Copy link
Member

hadley commented Jan 26, 2016

That works fine for me with the latest ggplot2 and Hmisc.

@smouksassi
Copy link
Author

This is what I get with ggplot2_2.0.0.9001 and Hmisc_3.17-1
The median line is wrong what should I load to get the right results ?

rplot

what is expected is like this:

rplot02

@hadley
Copy link
Member

hadley commented Jan 27, 2016

Ok, now I see what you're talking about. This is why making the most minimal possible example is helpful.

@hadley hadley reopened this Jan 27, 2016
@hadley hadley added this to the v2.1.0 milestone Jan 27, 2016
@hadley hadley closed this as completed in ab13b09 Jan 27, 2016
@hadley hadley added the bug an unexpected problem or unintended behavior label Jan 27, 2016
@smouksassi
Copy link
Author

Hi Hadley many thanks for the fast response and fix. Thank you for making R awesome.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants