This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Run Simon Urbanek's benchmark v2.5 | |
| cat("R version\n") | |
| cat("=========\n") | |
| print(R.version) | |
| if(exists("Revo.version")) { | |
| cat("Revo version") | |
| cat("============") | |
| print(Revo.version) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(rgl) | |
| open3d() | |
| comet <- readOBJ(url("http://sci.esa.int/science-e/www/object/doc.cfm?fobjectid=54726")) | |
| shade3d(comet, col="gray") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Adapted from https://gist.github.com/abresler/46c36c1a88c849b94b07 | |
| ## Blog post Jan 21 | |
| ## http://blog.revolutionanalytics.com/2015/01/a-beautiful-story-about-nyc-weather.html | |
| library(checkpoint) | |
| checkpoint("2015-01-28") | |
| library(dplyr) | |
| library(tidyr) | |
| library(magrittr) | |
| library(ggplot2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(checkpoint) | |
| checkpoint("2015-03-04") | |
| require(devtools) | |
| ## no way to install EBImage reproducibly | |
| source("http://bioconductor.org/biocLite.R") | |
| biocLite("EBImage") | |
| # latest commits as of 2015-03-04 | |
| install_github("ramnathv/rblocks", ref="a85e748390c17c752cc0ba961120d1e784fb1956") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## source: https://github.com/toddwschneider/nyc-taxi-data/blob/master/analysis/analysis.R | |
| dropoffs = query("SELECT * FROM dropoff_by_lat_long_cab_type ORDER BY count") | |
| dropoffs = mutate(dropoffs, cab_type_id = factor(cab_type_id)) | |
| p = ggplot() + | |
| geom_polygon(data = ex_staten_island_map, | |
| aes(x = long, y = lat, group = group), | |
| fill = "#080808", color = "#080808") + | |
| geom_point(data = dropoffs, | |
| aes(x = dropoff_long, y = dropoff_lat, alpha = count, size = count, color = cab_type_id)) + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## R script and data by Kieran Healey | |
| ## https://twitter.com/kjhealy/status/669567682178654208 | |
| datafile = "blog.revolutionanalytics.com/downloads/tdata.csv" | |
| library(ggplot2) | |
| x = read.csv(paste0("http://",datafile)) | |
| ggplot(x) + geom_tile(aes(x=H,y=T,fill=tc))+scale_fill_identity() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(emoGG) | |
| library(ggplot2) | |
| # set the am variable to be different emoji | |
| mtcars$am[mtcars$am==1] <- "1f697" | |
| mtcars$am[mtcars$am==0] <- "1f68c" | |
| # use am as the emoji aesthetic | |
| ggplot(mtcars, aes(wt, mpg, emoji=am))+ geom_emoji() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rf_ga3 | |
| 1010 samples | |
| 58 predictors | |
| 2 classes: 'PS', 'WS' | |
| Maximum generations: 100 | |
| Population per generation: 20 | |
| Crossover probability: 0.8 | |
| Mutation probability: 0.1 | |
| Elitism: 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(checkpoint) | |
| checkpoint("2016-04-22") | |
| library(weatherData) | |
| city <- "SJC" | |
| cityLongName <- "San Jose" | |
| yearStart <- 1991 | |
| yearEnd <- 2015 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| inPowerBI <- exists("dataset") | |
| if (inPowerBI) { | |
| weatherHistory <- dataset | |
| weatherHistory$Date <- as.Date(paste(dataset$Year, dataset$Month, dataset$Day, sep = "/"), format = "%Y/%b/%d") | |
| #warning(paste(dataset$Year, dataset$Month, dataset$Day, sep = "/")[1]) | |
| #warning(weatherHistory$Date[1]) | |
| } | |
| library(checkpoint) | |
| checkpoint("2016-04-22") |
OlderNewer