Sorry, me again. Trying to fix all my packages to work with ggplot2_0.9.3 Three of 4 fixed, this is the last one!
I have a function with this bit in it:
if (method == "sem") {
p <- p + stat_summary(fun.data = "seXy")
if ((type == "connect") | (type == "anova")) {
p <- p + stat_summary(fun.y = "mean", geom = "line")
}
}
The behavior in the earlier versions of ggplot2 was to first draw a pointrange using function seXy (basically std error of the mean). That still works fine. The second if statement would draw a line connecting the means in each level of each group (and I suppose it overdraws the mean point). In ggplot2_0.9.3, I get this message:
geom_path: Each group consist of only one observation. Do you need to adjust the group aesthetic?
The group aesthetic was set earlier in the function as:
p <- ggplot(data, aes_string(x = fac1, y = res, color = fac2,
group = fac2))
Now fac2 is most definitely not composed of one observation (test data below), although I suppose AFTER doing stat_summary one might say there is one observation per group, namely the mean. Of course, that is the intent, so I don't think it should generate a warning.
This function is rxnNorm which is here if you need the full thing:
github.com/bryanhanson/HandyStuff/tree/master/R The example I am running is in
github.com/bryanhanson/HandyStuff/blob/master/man/rxnNorm.Rd (There are some deprecated warnings which I have fixed but not pushed to the repo).
Thanks, Bryan
str(testData)
'data.frame': 60 obs. of 4 variables:
$ r : num 5.45 5.53 4.03 5.12 5.22 ...
$ f1 : Factor w/ 3 levels "L","M","H": 1 1 1 1 1 1 1 1 1 1 ...
$ f2 : Factor w/ 2 levels "GMO","WT": 2 2 2 2 2 2 2 2 2 2 ...
$ no1: num 5 5 5 5 5 5 5 5 5 5 ...