Skip to content

Instantly share code, notes, and snippets.

@aammd
Created January 26, 2017 15:34
Show Gist options
  • Save aammd/1e9e1cde27951455ea410a7d9c9bcb9e to your computer and use it in GitHub Desktop.
Save aammd/1e9e1cde27951455ea410a7d9c9bcb9e to your computer and use it in GitHub Desktop.
fake exponential growth with error
library(dplyr)
library(ggplot2)
data_frame(x = seq(2001, 2016, by = 2),
y = exp(rnorm(length(x), mean = 0.3, sd = 0.03)*(x - 2000))) %>%
ggplot(aes(x = x, y = y)) + geom_point() + geom_line() +
labs(x = "Year",
y = "Cumulative number of papers",
title = "Number of papers with a 'Number of papers' figure") +
theme_bw()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment