Skip to content

Instantly share code, notes, and snippets.

View DavidArenburg's full-sized avatar

David Arenburg DavidArenburg

View GitHub Profile
anomaly2 <- function (x, n = if(is.null(sig)) 10 else NULL, method = "hdr", robust = TRUE, plot = TRUE,
labels = TRUE, col, sig = NULL) {
nc <- nrow(x)
if(!is.null(n)){
if (nc < n) {
stop("Your n is too large.")
}
}
@DavidArenburg
DavidArenburg / README.md
Last active August 29, 2015 14:14
Vectorized Var, SD, Cov and Cor functions

These functions are meant to replace *apply loops when working row wise

Load the Gist

library(devtools)
source_gist("cca995ec1709c0d4735d")

Some use cases