classNeighborFunction: Calculation of relations from a class to its neighbor objects

Description Usage Arguments Value Note

View source: R/classNeighborFunction.R

Description

This function calculates statistics for every object of a specific class to its neighbor objects. It is computationally identical to the relationalObjectFunction. However, the function additionally enables the possibility to perform statistics for neighbors in a specific direction, likewise the relationalClassFunction, and to select class objects by expressions.

Usage

1
2
3
4
5
6
classNeighborFunction(spdf, nb, class.var, var, calc.nb.flow = FALSE,
  col.flow = NULL, bb.intersection = "rgeos",
  class.as.neighbors = FALSE, bb = NULL, return.bb.flow = FALSE,
  scale.factor.flow = c(1, 1), centroid.flow = TRUE,
  set.centroid.flow = "inverse", k.centroid.flow = 2, k.flow = 2,
  scale.side.flow = "small", quiet = TRUE)

Arguments

spdf

SpatialPolygonsDataFrame, or full path of a shapefile

nb

object neighborhood based on poly2nb. Otherwise, neighborhood is computed by spdep::poly2nb(..., Queens = TRUE)

class.var

defination of class. Can be string or integer, or an expression in form of a list. For examples: class = as.integer(1), class = list("> 2.5", "expression"), class = list(c("> 2", "&", "< 7"), "expression")

var

vector with number or name defining 1. field of evaluation (i.e. slope) and 2. field of weights (i.e. area). For example: c("Slope", "Area") or c(1,2)

calc.nb.flow

include statistics for neighbors in flow direction. Default: FALSE

col.flow

column specifying direction. Default: NULL

bb.intersection

method for intersection with bounding box. Default: "rgeos" (alternative: "sp")

class.as.neighbors

class object is also neighbor object. Default: FALSE

bb

input of bounding box geometry. Default: NULL

return.bb.flow

return geoemtry of counding box. Default: FALSE

quiet

no outputs in console. Default: TRUE

only.neighbors

object statistics are computed only for neighbors. Default: TRUE (FALSE means computation for the entiry data)

other...

see getBoundingBox

Value

data.frame containing object statistics, and optional the created geometry of getBoundingBox

Note


ggRaver/Lslide documentation built on Aug. 29, 2019, 1:53 a.m.