Skip to content

Instantly share code, notes, and snippets.

View wmatwijec's full-sized avatar

Walt Matwijec wmatwijec

  • Nashville, TN
View GitHub Profile
@wmatwijec
wmatwijec / wer_all.R
Created December 5, 2017 12:31 — forked from glamp/wer_all.R
library(plyr)
find_zones <- function(x) {
x.mean <- mean(x)
x.sd <- sd(x)
boundaries <- seq(-4, 4)
# creates a set of zones for each point in x
zones <- sapply(boundaries, function(i) {
i * rep(x.sd, length(x))
})