This file contains 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(XML) | |
library(plyr) | |
observations <- readHTMLTable("http://www.amsmeteors.org/observations/", which=1) | |
observations$Altitude <- gsub("[m,]", "", observations$Altitude) | |
observations$Altitude <- gsub("-", "0", observations$Altitude) | |
observations$Location = gsub("\\s", "", observations$Location) | |
observations$Location = gsub("°", "", observations$Location) |
This file contains 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(shiny) | |
library(mc2d) | |
library(ggplot2) | |
library(scales) | |
shinyServer(function(input,output){ | |
values <- reactiveValues() | |
values$N <- 50000 |
This file contains 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(data.table) | |
library(bit64) | |
# data.table is a wicked fast data.frame compatible object | |
# and fread() is a wicked fast file reader that behaves | |
# like read.csv(). it's even faster and more efficient if | |
# we provide a row count (estimate) so we do that here | |
marx <- fread("marx-geo.csv", nrows=451582, sep=",", header=TRUE) |
This file contains 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(shiny) | |
library(ggplot2) | |
library(RCurl) | |
library(reshape2) |
This file contains 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(sltl) | |
out <- sltl(as.timeSeries(co2), | |
c.window=101, | |
c.degree=1, | |
type="monthly") | |
summary(out) | |
plot.sltl(out) |
This file contains 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(shiny) | |
library(ggplot2) | |
library(scales) | |
library(grid) | |
library(gridExtra) | |
shinyServer(function(input, output) { | |
output$countPlot <- renderPlot({ | |
This file contains 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(ggplot2) | |
library(ggmap) | |
library(plyr) | |
library(grid) | |
library(gridExtra) | |
# read in cleaned up data | |
dat <- read.table("quakes.dat", header=TRUE, stringsAsFactors=FALSE) | |
# map decimal magnitudes into an integer range |
This file contains 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
export PKG_LIBS=`Rscript --vanilla -e 'Rcpp:::LdFlags()'` | |
export PKG_CPPFLAGS=`Rscript --vanilla -e 'Rcpp:::CxxFlags()'` | |
R CMD SHLIB -lldns txt.cpp |
This file contains 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(RCurl) | |
library(XML) | |
library(plyr) | |
#' get the Qualys SSL Labs rating for a domain+cert | |
#' | |
#' @param site domain to test SSL configuration of | |
#' @param ip address of \code{site} (will resolve it and take\cr | |
#' first response if not specified, but that may not always work as you expect) | |
#' @param hide.results ["on"|"off"] should the results show up in the SSL Labs history (default "on") |
This file contains 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
--- | |
title: "Vectorize() Vectorization Example" | |
author: "Bob Rudis (@hrbrmstr)" | |
date: "May 16, 2014" | |
output: md_document | |
--- | |
```{r echo=FALSE, message=FALSE, error=FALSE, warning=FALSE} | |
library(Rcpp) | |
# We need this to ensure knitr+Rcpp can link to the boost library |