Matthias Bannert (KOF, ETH Zurich)
April 30th
“Motivation is key. And it's all you can do in a couple of hours. It's like showing fat kids how to loose weight. There are tons of ways to do it. None of them will probably loose significant weight during a 3 hour session, but you can show them it's fun loosing weight and everybody has to continue working on their own from there on.”
– From a community discussion about proper R Introduction.
-> Interactivity and a comfortable IDE enable us to use R as applied statisticians, not as software developers.
Popular Ressources
# ?function name
?mean
# function 'calls' without () are also telling
sd
function (x, na.rm = FALSE)
sqrt(var(if (is.vector(x)) x else as.double(x), na.rm = na.rm))
<bytecode: 0x103f861b8>
<environment: namespace:stats>
# Arithmetic Operators are functions too
?"+"
require(ggplot2)
nrow(movies)
[1] 58788
# movies is an example dataset, it's just a data.frame
# with movie ratings
# just add more layers to the plot
m <- ggplot(movies, aes(x = rating))
m <- m + geom_histogram(binwidth = 0.5)
m <- m + aes(y = ..density..)
m + facet_grid(Action ~ Comedy)
html, .rtf, .tex, .md, .pdf can be created using R.
Shiny is an application server for R web apps. Write R Code, Shiny generates interactive apps for you. You have to know hardly any HTML / CSS or even Javascript to build web applications.