rezone: Rezone existing data

Description Usage Arguments Value Examples

Description

rezone randomly rezones an existing zoning system, allowing for user-defined constraints. Zones can be output in either raster or vector format.

Usage

1
rezone(x, rz_df, ras = FALSE)

Arguments

x

an object of class Raster.

rz_df

a three-column data frame. The firs two columns are used to assign zones to regions by passing values to Reclassify. The third column indicates the number of zones to generate in each rezoning region.

ras

logical indicating whether output should be in raster or vector format. The default is FALSE.

Value

rezone returns either a Raster or SpatialPolygons class object representing a new set of randomly generated zones reflecting the constraints placed on the rezoning process.

Examples

1
2
3
r <- algo3(x = c(20, 20), m = 5, ras = TRUE)
rz_vals <- data.frame(1:6, 1:6, c(2, 1, 1, 1, 1, 1))
rezone(x = r, rz_df = rz_vals, ras = TRUE)

aslez/maup documentation built on May 10, 2019, 2:04 p.m.