Jone Wy
unread,Oct 9, 2009, 12:15:02 AM10/9/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ggplot2
Hi,
I tried the following functions with my own data and also with the
sample data of ggplot2.
stat_sum_df <- function(fun, geom="crossbar", ...) {
stat_summary(fun=fun, colour="red", geom=geom, width=0.2, ...)
}
stat_sum_single <- function(fun, geom="point", ...) {
stat_summary(fun=fun, colour="red", geom=geom, size = 3, ...)
}
The testing code:
c <- qplot(cyl, mpg, data=mtcars)
c+stat_sum_single(mean)
or
c + stat_sum_single(mean, geom="line")
But I always got the error message: "Error in get("calculate_groups",
env = .$stat, inherits = TRUE)(.$stat, : argument 4 matches multiple
formal arguments".
Any help? Thank you very much.
Dan