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

Comments

Projects
None yet
2 participants
@smouksassi

smouksassi commented Jan 26, 2016

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

This comment has been minimized.

Member

hadley commented Jan 26, 2016

@hadley hadley closed this Jan 26, 2016

@hadley

This comment has been minimized.

Member

hadley commented Jan 26, 2016

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

@hadley

This comment has been minimized.

Member

hadley commented Jan 26, 2016

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

@hadley

This comment has been minimized.

Member

hadley commented Jan 26, 2016

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

@smouksassi

This comment has been minimized.

smouksassi commented Jan 26, 2016

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

This comment has been minimized.

Member

hadley commented Jan 26, 2016

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

@smouksassi

This comment has been minimized.

smouksassi commented Jan 27, 2016

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

This comment has been minimized.

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 in ab13b09 Jan 27, 2016

@hadley hadley added the bug label Jan 27, 2016

@smouksassi

This comment has been minimized.

smouksassi commented Jan 27, 2016

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.