Skip to content

Instantly share code, notes, and snippets.

@jer-shiny
jer-shiny / grts2.R
Last active December 27, 2015 04:59
Shiny spatialbal
grts2<-function (design, DesignID = "Site", SiteBegin = 1, type.frame = "finite",
src.frame = "shapefile", in.shape = NULL, sp.object = NULL,
att.frame = NULL, id = NULL, xcoord = NULL, ycoord = NULL,
stratum = NULL, mdcaty = NULL, startlev = NULL, maxlev = 11,
maxtry = 1000, shift.grid = TRUE, do.sample = rep(TRUE, length(design)),
shapefile = TRUE, prjfilename = NULL, out.shape = "sample")
{
if (is.null(design))
stop("\nA design list must be provided.")
strata.names <- names(design)