I have the following data:
structure(list(Expo = structure(c(2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L), .Label = c("DC", "DI"), class = "factor"), Quail = c(5L,
6L, 16L, 17L, 28L, 29L, 30L, 53L, 54L, 11L, 12L, 46L, 48L, 60L,
11L, 48L, 6L, 5L, 6L, 18L, 29L, 30L, 53L, 11L, 36L, 46L, 47L,
60L, 11L, 4L, 5L, 6L, 16L, 17L, 28L, 29L, 30L, 52L, 53L, 54L),
Segment = c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), Position = c(1949L,
1949L, 1949L, 1949L, 1949L, 1949L, 1949L, 1949L, 1949L, 1949L,
1949L, 1949L, 1949L, 1949L, 1949L, 1949L, 1949L, 1949L, 1949L,
1949L, 1949L, 1949L, 1949L, 1949L, 1949L, 1949L, 1949L, 1949L,
1949L, 1949L, 1949L, 1949L, 1949L, 1949L, 1949L, 1949L, 1949L,
1949L, 1949L, 1949L), Freq = c(0.034496, 0.034845, 0.031079,
0.020761, 0.037311, 0.047204, 0.062257, 0.100617, 0.022637,
0.587758, 0.470607, 0.037855, 0.02897, 0.034457, 0.87815,
0.022788, 0.169897, 0.058831, 0.116039, 0.032077, 0.081132,
0.09126, 0.051852, 0.896703, 0.09873, 0.054908, 0.027505,
0.50293, 0.975181, 0.03713, 0.092243, 0.028103, 0.044125,
0.057707, 0.091152, 0.085498, 0.130286, 0.030099, 0.049717,
0.070069), day = c(3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 7L, 7L, 7L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L,
5L, 1L, 1L, 8L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L
)), row.names = c(NA, -40L), class = "data.frame")
When I run
ggplot(Expo.Shared.PB1, aes(x=as.numeric(day), y=Freq, color = as.character(Quail))) +
geom_path()+
geom_point() +
facet_grid(Expo~.)
It gives me the following (incorrect) plot.
I solved this adding stat="summary" to both geoms but on doing so it gives me the following message: No summary function supplied, defaulting to `mean_se()
ggplot(Expo.Shared.PB1, aes(x=as.numeric(day), y=Freq, color = as.character(Quail))) +
geom_path(stat = "summary")+
geom_point(stat = "summary") +
facet_grid(Expo~.)
The output:
The plot seems what I am looking for, now:
what is stat="summary" really doing? Are the values plotted modified from the original values? is it ok to overlook the message? (I am sure is not).