rrap.proportion.held: Proportion held using reliable RAP formulation.

View source: R/rrap.proportion.held.R

rrap.proportion.heldR Documentation

Proportion held using reliable RAP formulation.

Description

This is a convenience function to quickly calculate the proportion of variation that one set of points captures in a another set of points using the reliable formulation.

Usage

rrap.proportion.held(
  pu.coordinates,
  pu.probabilities,
  dp.coordinates,
  dp.weights,
  failure.distance,
  maximum.r.level = as.integer(length(pu.probabilities))
)

Arguments

pu.coordinates

base::matrix() of planning unit coordinates.

pu.probabilities

numeric vector of planning unit probabilities.

dp.coordinates

base::matrix() of demand point coordinates.

dp.weights

numeric vector of demand point weights.

failure.distance

numeric indicating the cost of the failure planning unit.

maximum.r.level

integer maximum failure (R) level to use for calculations.

Value

numeric value indicating the proportion of variation that the demand points explain in the planning units

Examples

## Not run: 
rrap.proportion.held(as.matrix(iris[1:2,-5]), runif(1:2),
                     as.matrix(iris[1:5,-5]), runif(1:5), 10)

## End(Not run)

jeffreyhanson/raptr documentation built on Feb. 3, 2024, 10:56 p.m.