reallocate: reallocate

Description Usage Arguments Value Note Author(s)

Description

Computes a spatial reallocation of statistics

Usage

1
2
reallocate(x, y, area.x, area.y, by.x = NULL, by.y = NULL, data,
  warea = NULL, wprob = NULL, aggregates = NULL)

Arguments

x

object of class "data.frame" giving statistics reported for a given area

y

object of class "data.frame" giving intersections between 2 or more types of areas, the intersecting surface and possibly giving a probability field

area.x

object of class "character" giving the name of the x-field representing the source area (typically an area code)

area.y

object of class "character" giving the name of the y-field representing the source area in object provided in argument y (typically an area code)

by.x

object of class "character" (possibly a vector) giving the name(s) of optional additional x-fields to be mapped

by.y

object of class "character" (possibly a vector) giving the name(s) of optional additional y-fields to be mapped

data

object of class "character" giving the name of the x-field representing the numerical values to reallocate

warea

object of class "character" giving the name of the y-field representing the intersecting surface. NULL by default

wprob

object of class "character" giving the name of the y-field representing an additional probability value. NULL by default

aggregates

object of class "character" (possibly a vector) giving the name(s) of the y-field(s) that represent to target geographic dimension. Default is NULL (in which case the raw computations will be returned, with no aggregation at all)

Value

an object of class "data.frame"

Note

At least a value has to be provided for 'warea' (area reallocation) or 'wprob' (probabilistic reallocation). Both reallocation can be combined together.

Author(s)

Emmanuel Blondel emmanuel.blondel1@gmail.com


eblondel/spread documentation built on May 15, 2019, 7:48 p.m.