Displaying 20 results from an estimated 41 matches for "stat_summary".
2011 Nov 09
1
ggplot stat_summary (mean_cl_boot)
Hello,
This is a pretty simple question, but after spending quite a bit of time
looking at "Hmisc" and using Google, I can't find the answer.
If I use stat_summary(fun.data="mean_cl_boot") in ggplot to generate 95%
confidence intervals, how many bootstrap iterations are preformed by
default? Can this be changed? I would at least like to be able to report
the number of boot strap interations used to generate the CIs.
I haven't been able to find...
2010 Nov 02
5
Question about ggplot2
...of the figure. My question is: how do I change the scale
of the y-axis so that it does not have the range between 0 and 1 but
between 0 and 0.1? Many thanks.
By the way, I am using ggplot2, and here is my code:
-------------------------------
year.plot <- ggplot(d, aes(year, rate))
year.plot + stat_summary(fun.y = "mean", geom = "line")
-------------------------------
Best,
Shige
2013 Feb 15
1
Why no line? (ex. from Andy Filed book)
...quot;Hiccups.dat", header = TRUE)
hiccups<-stack(hiccupsData)
names(hiccups)<-c("Hiccups","Intervention")
hiccups$Intervention_Factor<-factor(hiccups$Intervention, levels =
hiccups$Intervention)
line <- ggplot(hiccups, aes(Intervention_Factor, Hiccups))
line + stat_summary(fun.y = mean, geom = "point") + stat_summary(fun.y =
mean, geom = "line", aes(group=1),colour = "Red", linetype = "dashed")+
stat_summary(fun.data = mean_cl_boot, geom = "errorbar", width = 0.2) +
labs(x = "Intervention", y = "Mean Nu...
2013 Oct 12
2
Order of factors with facets in ggplot2
...4, sep=""))
x <- runif(100)
df <- data.frame(f1, f2, x)
#df <- df[order(df[,1]), ]
df <- ddply(df, ~ f1 + f2, transform, Avg_x = mean(x))
myplot <- ggplot(df, aes(x=reorder(f2, Avg_x), x)) + geom_boxplot() +
facet_wrap(~ f1, scale = "free", ncol = 1) +
stat_summary(fun.y=mean, geom="point", col = "red")
myplot
Thanks in advance for any help!
Lars.
[[alternative HTML version deleted]]
2012 Jul 03
2
ggplot2: legend
...r those two (the line for "Overall Mean" on the other hand is wanted):
library(ggplot2)
ddf <- data.frame(x = factor(rep(LETTERS[1:2], 5)), y = rnorm(10))
p <- ggplot(ddf, aes(x = x, y = y))
p + geom_point(aes(colour="Observations", shape="Observations")) +
stat_summary(aes(colour = "Means", shape ="Means"),
fun.y = mean, fun.ymin = min, fun.ymax = max,
geom = "point") +
geom_hline(aes(yintercept = mean(y), linetype = "Overall Mean"), show_guide = TRUE)
I tried to map the linetype in...
2011 Jan 24
1
ggplot2 - ribbon
Dear List,
I am having trouble setting the transparency of a ribbon in ggplot2 and was wondering if anybody had any suggestions
so far i have a plot exactly as i want it and i want to add a ribbon connecting the ymax and ymin, whci i do with the following command
m10 + stat_summary(geom="ribbon", fun.ymin="min", fun.ymax="max")
However the ribbon is a dark grey and i want to make it much lighter or change the colour. I was wondering if anybody had any ideas?
I have kept the code used so far brief as it is quite long, however i can expand if req...
2009 Sep 14
1
ggplot, ribbon not showing up properly
...is connected by a line
over time
p <- ggplot(dat, aes(x=Day, y=Y, group=ID)) +
scale_x_continuous(breaks=sort(unique(dat$Day))) +
geom_line(colour=alpha("blue", 5/10))
# Adding mean, 1 sd bounds using crossbar geom is ok. But the same info
using ribbon geom doesn't work.
p + stat_summary(data=dat.less, aes(group=1), geom="crossbar",
fun.data="mean_sdl", mult=1) + stat_summary(data=dat.less, aes(group=1),
geom="ribbon", fun.data="mean_sdl", mult=1, fill=alpha("blue", 1/10))
2010 Oct 28
1
ggplot2: facet_grid with only one level does not display the graph with the facet_grid level in title
Hi All,
Here is the code that I'll be referring to:
p <- ggplot(wastran.data, aes(PER_KEY, EVENTS))
(p <- p +
facet_grid( pool.short ~ .) +
stat_summary(aes(y=EVENTS), fun.y = sum, geom="line") +
opts(axis.text.x = theme_text(angle = 90, hjust=1), title="Events
(15min.) vs. Time: Facet pool", strip.text.y = theme_text())
)
Now, depending on preceding parameters, the 'pool.short' factor variable in
'wastran.data...
2008 Feb 18
2
Custom Plot - means, SD & 5th-95th% (Plotmeans or Boxplot)?
Any help with this problem would be greatly appreciated:
I need to produce a custom plot i haven't come across in R. Basically, I
want to show means, 1st standard deviation and 5th and 95th percentiles
visually, using something resembling a boxplot. Is it possible to completely
customize a boxplot so that it shows means as the bar (instead of, not as
well as medians), standard deviations at
2009 Jan 11
2
connecting boxplots
Hii,
I created some boxplots with this commands:
x <-read.table(file="test.txt")
x$group <- rep(1:8, each=5)
boxplot(V3~gruppe, data=x)
Now, I will connect the boxplots to each other to the min, max and median
values.
Can anybody help me how to do it ?
greetings,
J
--
View this message in context: http://www.nabble.com/connecting-boxplots-tp21405459p21405459.html
Sent from
2013 Nov 12
0
geom_abline does not seem to respect groups in facet_grid [ggplot2]
...=100)*dt$score + (dt$score>100)*100
The following displays mean score by cohort with 95% CL, facetted by subject, and includes a (blue, dashed) reference line (using
geom_abline).
library(ggplot2)
library(Hmisc)
ggp <- ggplot(dt,aes(x=cohort, y=score)) + ylim(0,100)
ggp <- ggp + stat_summary(fun.data="mean_cl_normal")
ggp <- ggp + geom_abline(aes(slope=0,intercept=mean(score)),color="blue",linetype="dashed")
ggp <- ggp + facet_grid(subject~.)
ggp
The problem is that the reference line (from geom_abline) is the same in all facets (= the grand a...
2009 Apr 21
0
ggplot2 version 0.8.3
...mistakenly reordered
* scale_hue: now spans full range of hue if it less than 360 degrees
* scale_hue: rotated default hue range by 15 degrees to avoid
unfortunate red-green contrast in two colour case
* show now works with ggplot objects
* stat_sum: fixed bug which resulted in dropped aesthetics
* stat_summary: now warns when dropping records with missing values
* stat_summary: should be a little faster
* stat_summary: correctly passes ... arguments on fun.data
* theme_bw: corrected justification of axis.text.y
* trans: bug fixes to logistic transformation
* order aesthetic should work again
--
http://...
2009 Apr 21
0
ggplot2 version 0.8.3
...mistakenly reordered
* scale_hue: now spans full range of hue if it less than 360 degrees
* scale_hue: rotated default hue range by 15 degrees to avoid
unfortunate red-green contrast in two colour case
* show now works with ggplot objects
* stat_sum: fixed bug which resulted in dropped aesthetics
* stat_summary: now warns when dropping records with missing values
* stat_summary: should be a little faster
* stat_summary: correctly passes ... arguments on fun.data
* theme_bw: corrected justification of axis.text.y
* trans: bug fixes to logistic transformation
* order aesthetic should work again
--
http://...
2023 Nov 21
1
Cambiar el intervalo de confianza en un anova
...caciones, mejor que trabajar directamente con "ggplot".
> > Sería así:
> >
> > #-------------
> > library(ggeasy)
> >
> > ggplot(data = AÑOS, aes(x = VARIEDAD, y = rAUDPCor, colour = ANO,
> > group = ANO)) +
> > stat_summary(fun = mean, geom = "point") +
> > stat_summary(fun = mean, geom = "line") +
> > labs(y = 'mean rAUDPCor') +
> > labs(x = 'Variety') +
> > theme_bw() +
> > easy_rotate_x_labels( angle = 90)
> >
> > #----------...
2008 Sep 09
6
plotting group means
Hi all,
I want to plot the grouped means of some variables. The dependent variables
and the grouping factor are stored in different columns. I want to draw a
simple line-plot of means, in which the x-axis represents the variables and
y-axis represents the means. The means of the groups should be connected by
lines. So far, the only function that I could find comes closest to what I'm
2023 Nov 21
1
Cambiar el intervalo de confianza en un anova
...omiendo que uses la librería "ggeasy" que simplifica mucho estas modificaciones, mejor que trabajar directamente con "ggplot".
Sería así:
#-------------
library(ggeasy)
ggplot(data = AÑOS, aes(x = VARIEDAD, y = rAUDPCor, colour = ANO,
group = ANO)) +
stat_summary(fun = mean, geom = "point") +
stat_summary(fun = mean, geom = "line") +
labs(y = 'mean rAUDPCor') +
labs(x = 'Variety') +
theme_bw() +
easy_rotate_x_labels( angle = 90)
#------------
Gracias,
Carlos Ortega
www.qualityexcellence.es<http://www.qua...
2007 Jun 19
0
ggplot2 0.5.2
...x and y axes named incorrectly (thanks to Dieter Menne for spotting this)
* can now pass position objects to qplot
* y jitter calculated correctly, and jittered data rescales axis now
* removed silly legend from quantile plot
* extra arguments not being passed on to geoms/stats
* fixed bug in stat_summary when summarising a factor
* fixed bugs in stat_summary, geom_ribbon, and coord_trans examples
_______________________________________________
R-packages mailing list
R-packages at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-packages
2007 Jun 19
0
ggplot2 0.5.2
...x and y axes named incorrectly (thanks to Dieter Menne for spotting this)
* can now pass position objects to qplot
* y jitter calculated correctly, and jittered data rescales axis now
* removed silly legend from quantile plot
* extra arguments not being passed on to geoms/stats
* fixed bug in stat_summary when summarising a factor
* fixed bugs in stat_summary, geom_ribbon, and coord_trans examples
_______________________________________________
R-packages mailing list
R-packages at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-packages
2011 Feb 13
1
Changes titles in ggplot2 plot
Dear Colleagues,
In the following simple ggplot2 code:
--------------------------------
m <- ggplot(d.fig, aes(time, prob))
m + stat_summary(fun.data = "median_hilow", conf.int = .95, geom =
"smooth") + facet_wrap(~ Cohort, nrow=1) + coord_cartesian(ylim = c(0,
.03))
--------------------------------
Is there a way to replace the y-axis label from "prob" to "Predicted
Probability" and replace the x...
2009 Feb 25
0
ggplot2 0.8.2
...http://github.com/hadley/ggplot2
ggplot2 0.8.2 (2008-02-23)
----------------------------------------
New features
* borders, fortify.map and map_data to make it easier to draw map
borders and choropleth maps
* cut_interval and cut_number utility functions to discretise
continuous variables
* stat_summary has reparameterised to make it easier to specify
different summary functions. It now has four parameters: fun.y,
fun.ymin and fun.ymax; and fun.data. See the documentation for
stat_summary for more details
Minor improvements
* ggfluctuation: default to aspect ratio that produces squares
* ggsav...