p <- ggplot(iris.long, aes(x = Flower, y= value, group=key, color=key)) + geom_line() + facet_grid(~Species, scales = "free_x")
p
nice plot
Update plot with statistics
x <-iris.long %>% select(-Species) %>% spread(Flower, value) %>% ExtractMatrix() %>% medpolish()
## 1: 306.1
## 2: 300.15
## Final: 299.45
mstat <- tibble(Flower = as.character(names(x$col)), value= x$col + x$overall, key= as.factor("Median"))
yy <-iris.long %>% select(Species, Flower)
xx <- inner_join(mstat,yy, by="Flower")
head(xx)
## # A tibble: 6 x 4
## Flower value key Species
## <chr> <dbl> <fct> <fct>
## 1 X1 2.61 Median setosa
## 2 X1 2.61 Median setosa
## 3 X1 2.61 Median setosa
## 4 X1 2.61 Median setosa
## 5 X10 2.46 Median setosa
## 6 X10 2.46 Median setosa
p + geom_line( aes(x = Flower, y=value, group=1) , data =xx, size=1.2, linetype=1, color="black")