I hereby claim:
- I am holstius on github.
- I am dholstius (https://keybase.io/dholstius) on keybase.
- I have a public key whose fingerprint is 6974 E4D6 0075 DA92 FE5B CA28 D2E8 C03F DDAB A245
To claim this, I am signing this object:
# Installation | |
library(devtools) | |
install_github("BAAQMD/CalEnviroScreen") | |
# Helper function: merge.SpatialPolygonsDataFrame() | |
source_gist("8d1aa85a1623243f8f1f") | |
# Data from CalEnviroScreen 2 (CES2) package | |
data(California, package = "CalEnviroScreen") | |
data(CES2, package = "CalEnviroScreen") |
merge.SpatialPolygonsDataFrame <- function (x, y, by, ...) { | |
require(sp) | |
y <- as.data.frame(y) | |
if (missing(by)) { | |
if (is.null(row.names(x@data)) || is.null(row.names(y))) { | |
warning("[merge.SpatialPolygonsDataFrame] merging by position") | |
i <- 1:nrow(x@data) | |
} else { | |
warning("[merge.SpatialPolygonsDataFrame] merging by row names") | |
i <- row.names(x@data) |
read_tbl <- function (..., stringsAsFactors = FALSE, check.names = FALSE) { | |
require(dplyr) | |
as.tbl(read.csv(..., stringsAsFactors = stringsAsFactors, check.names = check.names)) | |
} | |
write_tbl <- function (x, ..., row.names = FALSE) { | |
write.csv(as.tbl(x), ..., row.names = row.names) | |
} |
.DS_Store | |
build | |
node_modules |
titlecase <- function (x) { | |
# TODO: use Rex package | |
gsub("\\b([a-z])([a-z]+)", "\\U\\1\\L\\2", tolower(x), perl = TRUE) | |
} |
library(dplyr) | |
library(ggivs) | |
chart_data <- structure(list(CalYr = c(1990L, 1990L, 1990L, 1990L, 1990L, 1990L, | |
1990L, 2000L, 2000L, 2000L, 2000L, 2000L, 2000L, 2000L, 2010L, | |
2010L, 2010L, 2010L, 2010L, 2010L, 2010L, 2020L, 2020L, 2020L, | |
2020L, 2020L, 2020L, 2020L), Speed = c(0, 10, 20, 30, 40, 50, | |
60, 0, 10, 20, 30, 40, 50, 60, 0, 10, 20, 30, 40, 50, 60, 0, | |
10, 20, 30, 40, 50, 60), VMT = c(323694, 940682, 25396442, 43050277, | |
71101181, 16987641, 105467584, 222397, 859767, 57905435, 61835130, |
abs_path <- function (...) { | |
normalizePath(file.path(...), mustWork = FALSE) | |
} | |
cache_put <- function (.expr, path, ...) { | |
obj <- eval(.expr) | |
dn <- dirname(path) | |
if (!file.exists(dn)) { | |
dir.create(dn, recursive = TRUE) | |
} |
I hereby claim:
To claim this, I am signing this object:
mtcars %>% | |
datatable(options = list(columnDefs = list(list(searchable = TRUE, targets = 1:3)))) |
library(rgeos) | |
library(dplyr) | |
library(magrittr) | |
n_polygons <- 5 | |
n_vertices_each <- 3 | |
rand_coords <- function (n) | |
sprintf("%0.1f %0.1f", rnorm(n), rnorm(n)) |