MOVED TO: https://delicious.com/reinholdsson
Primarily R and JavaScript links. Collection maintained by Thomas Reinholdsson.
--- Todo: Move to github page and structure up ---
| load_packages <- function(pkgs, repo = "http://ftp.sunet.se/pub/lang/CRAN/"){ | |
| invisible(lapply(pkgs, function(pkg) { | |
| req <- function(x) require(x, character.only = TRUE) | |
| if(!suppressWarnings(req(pkg))){ | |
| install.packages(pkg, repos = repo) | |
| req(pkg) | |
| } | |
| })) | |
| } |
| library(shiny) | |
| library(rHighcharts) | |
| shinyServer(function(input, output) { | |
| .data <- reactive({ | |
| interest <- 1 + ( as.integer(input$interest) / 100 ) | |
| start <- as.numeric(input$start) | |
| monthly <- as.numeric(input$monthly) | |
| years <- as.integer(input$years) |
MOVED TO: https://delicious.com/reinholdsson
Primarily R and JavaScript links. Collection maintained by Thomas Reinholdsson.
--- Todo: Move to github page and structure up ---
| library(rredis) | |
| shinyServer(function(input, output) { | |
| output$show <- renderText({ | |
| redisConnect() | |
| res <- redisGet(input$key) | |
| redisClose() | |
| return(res) | |
| }) |
| library(rmongodb) | |
| shinyServer(function(input, output) { | |
| key <- reactive({ | |
| paste(input$key, "data", sep = ".") | |
| }) | |
| output$show <- renderText({ | |
| <!doctype HTML> | |
| <meta charset = 'utf-8'> | |
| <html> | |
| <head> | |
| <script src='http://code.jquery.com/jquery-1.9.1.min.js' type='text/javascript'></script> | |
| <script src='http://code.highcharts.com/highcharts.js' type='text/javascript'></script> | |
| <script src='http://code.highcharts.com/highcharts-more.js' type='text/javascript'></script> | |
| <style> |
An interactive Highcharts visualization created with R using rCharts
Click on the observations to read more about the movies at Rotten Tomatoes
Created by Thomas Reinholdsson
| library(rCharts) | |
| library(RJSONIO) | |
| library(data.table) | |
| # Read data from json file | |
| movieJSON <- paste(readLines("movies.json", warn = FALSE), collapse = "") | |
| movieList <- RJSONIO::fromJSON(movieJSON, simplify = F) | |
| movieTable <- rbindlist(lapply(movieList$movies, function(movie) { | |
| data.table( | |
| x = movie$ratings$critics_score, |
| library(httr) | |
| library(rCharts) | |
| library(RJSONIO) | |
| library(data.table) | |
| # Read data from json file | |
| movieJSON <- paste(readLines("movies.json", warn = FALSE), collapse = "") | |
| movieList <- RJSONIO::fromJSON(movieJSON, simplify = F) | |
| movieTable <- rbindlist(lapply(movieList$movies, function(movie) { | |
| data.table( |