Skip to content

Instantly share code, notes, and snippets.

@Manual{,
title = {R: A Language and Environment for Statistical Computing},
author = {{R Core Team}},
organization = {R Foundation for Statistical Computing},
address = {Vienna, Austria},
year = {2018},
url = {https://www.R-project.org/},
}
library(LexisPlotR)
# Create Lexis grid
l <- lexis.grid(year.start = 2014, year.end = 2017, age.start = 33, age.end = 37)
# Create a data.frame that contains the labels
labels <- data.frame(
x = c(
as.Date("2014-05-01"),
as.Date("2015-06-15"),
@Article{Arrow1986,
Title = {Rationality of Self and Others in an Economic System},
Author = {Arrow, Kenneth J.},
Journal = {The Journal of Business},
Year = {1986},
Number = {4},
Pages = {385--399},
Volume = {59}
}
@Article{Arrow1986,
Title = {Rationality of Self and Others in an Economic System},
Author = {Arrow, Kenneth J.},
Journal = {The Journal of Business},
Year = {1986},
Number = {4},
Pages = {385--399},
Volume = {59}
}
{"temps":[23.10992544866667, 23.1, 23.1, 23.151166627111113, 23.2, 23.2, 23.2, 23.2, 23.2, 23.175809506666667, 23.1, 23.096100380222225, 23.016945804555554, 23.0, 23.0, 23.0, 22.97057233977778, 22.899999999999995, 22.873912180555553, 22.8, 22.8, 22.8, 22.8, 22.748389378222225, 22.7, 22.7, 22.7, 22.638123477888886, 22.600000000000005, 22.6, 22.600000000000005, 22.6, 22.546484733222222, 22.5, 22.5, 22.5, 22.466106355444442, 22.437907829444445, 22.4, 22.4, 22.4, 22.4, 22.4, 22.4, 22.4, 22.465662309333336, 22.5, 22.579271262333332, 22.660654564777776, 22.792869846666665, 22.91461763, 23.111273547555555, 23.237012901666663, 23.352291350444442, 23.501240349333333, 23.6, 23.630328309777777, null, 23.82697448011111, 23.899999999999995, 23.84246804066667, 23.71025045644444, 23.645814319, 23.6, 23.6, 23.6, 23.6, 23.600000000000005, 23.600000000000005, 23.6, 23.6, 23.6, 23.511699365666665, 23.413367810999997, 23.4, 23.4, null, null, 23.498783813302218, 23.559654982888887, 23.6, 23.600000000000005, 23.511470005222222, 23
{"temps":[23.10992544866667, 23.1, 23.1, 23.151166627111113, 23.2, 23.2, 23.2, 23.2, 23.2, 23.175809506666667, 23.1, 23.096100380222225, 23.016945804555554, 23.0, 23.0, 23.0, 22.97057233977778, 22.899999999999995, 22.873912180555553, 22.8, 22.8, 22.8, 22.8, 22.748389378222225, 22.7, 22.7, 22.7, 22.638123477888886, 22.600000000000005, 22.6, 22.600000000000005, 22.6, 22.546484733222222, 22.5, 22.5, 22.5, 22.466106355444442, 22.437907829444445, 22.4, 22.4, 22.4, 22.4, 22.4, 22.4, 22.4, 22.465662309333336, 22.5, 22.579271262333332, 22.660654564777776, 22.792869846666665, 22.91461763, 23.111273547555555, 23.237012901666663, 23.352291350444442, 23.501240349333333, 23.6, 23.630328309777777, 23.76254981388889, 23.82697448011111, 23.899999999999995, 23.84246804066667, 23.71025045644444, 23.645814319, 23.6, 23.6, 23.6, 23.6, 23.600000000000005, 23.600000000000005, 23.6, 23.6, 23.6, 23.511699365666665, 23.413367810999997, 23.4, 23.4, 0, 0, 23.498783813302218, 23.559654982888887, 23.6, 23.600000000000005, 23.511470005222
{
"Monat": ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"],
"Temperatur": [1,2,5,8,14,18,19,22,17,13,4,3],
"Niederschlag": [12,6,18,24,12,9,8,14,21,14,8,3]
}
@ottlngr
ottlngr / LiteratureOnCommonKnowledgeInGameTheory.bib
Last active September 29, 2017 10:47
Some articles, books and book chapters on Common Knowledge in the field of game theory
@Article{Arrow1986,
Title = {Rationality of Self and Others in an Economic System},
Author = {Arrow, Kenneth J.},
Journal = {The Journal of Business},
Year = {1986},
Number = {4},
Pages = {385--399},
Volume = {59}
}
@ottlngr
ottlngr / tex_wordcloud.r
Created July 5, 2016 19:44
Make a wordcloud straight from a .tex file using R
library(stringr)
library(tm)
library(wordcloud)
library(SnowballC)
file <- "./file.tex"
txt <- readChar(file, file.info(file)$size)
@ottlngr
ottlngr / compare_versions.R
Created May 20, 2016 13:40
Case study: Compare package versions on CRAN and GitHub
library(RCurl)
library(magrittr)
library(stringr)
compare_versions <- function(package) {
cranurl <- paste("https://cran.r-project.org/web/packages/", package, "/", sep = "")
cranfile <- getURL(cranurl)
cranversion <- cranfile %>%
str_extract("(?<=Version:</td>\n<td>)[0-9a-zA-Z.-]*")
ghurl <- cranfile %>%