Last active
November 26, 2018 15:51
-
-
Save averissimo/e08a28e8aba88a8c313d74cd4625983e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "Untitled" | |
output: | |
BiocStyle::html_document: | |
dev: "svg" | |
--- | |
## Failing plots | |
```{r} | |
plot(1:10,-1:-10) | |
``` | |
```{r pressure, echo=FALSE} | |
library(ggplot2) | |
df <- data.frame( | |
gp = factor(rep(letters[1:3], each = 10)), | |
y = rnorm(30) | |
) | |
ds <- plyr::ddply(df, "gp", plyr::summarise, mean = mean(y), sd = sd(y)) | |
ggplot() + | |
geom_point(data = df, aes(gp, y)) + | |
geom_point(data = ds, aes(gp, mean), colour = 'red', size = 3) + | |
geom_errorbar( | |
data = ds, | |
aes(gp, mean, ymin = mean - sd, ymax = mean + sd), | |
colour = 'red', | |
width = 0.4 | |
) | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment