Displaying 2 results from an estimated 2 matches for "diamonds_df".
2013 Apr 30
1
Stacked geom_bar with aggregated SE -ggplot2
...my own data: getting
appropriate error bars once data is stacked in a bar graph.?
(original question:
http://r.789695.n4.nabble.com/ggplot2-se-variable-in-geom-errorbar-s-limits-
td3311176.html). It wouldn't let me reply to that thread.
A modification of the earlier answer:?
data(diamonds)?
?diamonds_df <- ddply(diamonds, .(cut, color), summarise,?
? ? ? ? ? ? ? ? ? ? ? ? mean_price = mean(price),?
? ? ? ? ? ? ? ? ? ? ? ? se_price = sd(price)/sqrt(length(price))?
? ? ? ? ? ? ? ? ? ? ? ? )?
?limits <- aes(ymax = mean_price + se_price, ymin = mean_price - se_price)?
a<-ggplot(diamonds_df,...
2011 Feb 17
3
ggplot2, 'se' variable in geom_errorbar's limits?
Dear R-list
I'm working with with geom_errorbar; specifically I'm trying to
reproduce the example Hadley Wickham have on
http://had.co.nz/ggplot2/geom_errorbar.html (all in the button of the
page) where he makes an nice plot with errorbars and then draw lines
between the points.
What confuses me is the 'limits' he defines for the errorbars from the
se variable.
First he creates