Matthias Bannert
- studied economics @UniKN
- PhD @ETHZ: partly economics, mostly methodology and stats
- currently: develops software for academic researchers @ETHZ
- open source software projects: timeseriesdb, dropR, RAdwords
25 Nov 2016
Matthias Bannert
"Use the R ecosystem effectively to build useful web apps and visualizations."
Approach
… check the stack:
… the following code does:
a <- 1+1 b <- 2+2 d <- a + b e <- c(1,2,4)
a <- 1+1 b <- 2+2 d <- a + b e <- c(1,2,4)
## [1] 2
## [1] 4
## [1] 6
## [1] 1 2 4
… the following code does:
m <- matrix(1:12,4,3)
d <- data.frame(col1 = 1:8,
col2 = letters[1:8])
l <- list()
l$element_a <- a
l$element_m <- m
l$element_d <- d
m <- matrix(1:12,4,3)
## [,1] [,2] [,3] ## [1,] 1 5 9 ## [2,] 2 6 10 ## [3,] 3 7 11 ## [4,] 4 8 12
d <- data.frame(col1 = 1:8,
col2 = letters[1:8])
## col1 col2 ## 1 1 a ## 2 2 b ## 3 3 c ## 4 4 d ## 5 5 e ## 6 6 f ## 7 7 g ## 8 8 h
l <- list() l$element_a <- a l$element_m <- m l$element_d <- d
## $element_a ## [1] 2 ## ## $element_m ## [,1] [,2] [,3] ## [1,] 1 5 9 ## [2,] 2 6 10 ## [3,] 3 7 11 ## [4,] 4 8 12 ## ## $element_d ## col1 col2 ## 1 1 a ## 2 2 b ## 3 3 c ## 4 4 d ## 5 5 e ## 6 6 f ## 7 7 g ## 8 8 h
?sum() ls() c() matrix() data.frame() list() head() tail() str() function() lapply()
3 files that live in one folder
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(
sidebarMenu()
),
# Body of the App #############
dashboardBody(
tabItems()
)
)
server <- function(input, output) {
output$someplot <- renderPlot({
hist(rnorm(input$N))
})
}