Skip to content

Instantly share code, notes, and snippets.

View rheimann's full-sized avatar

Rich Heimann rheimann

View GitHub Profile
@dsparks
dsparks / alphahull.R
Created December 4, 2012 02:53
Alpha Hull Example
doInstall <- TRUE
toInstall <- c("alphahull")
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
# Generate some sample data:
myData <- data.frame(x = rnorm(500), y = rnorm(500))
# With a unit-circle hole in the center:
myData <- myData[sqrt(rowSums(myData^2)) > 1, ]
plot(myData)