Learn R Programming

ProbForecastGOP (version 1.3.2)

calc.dist: Internal function used to compute the inter-site distance between sites.

Description

Calculates the distance between sites of a random variable. This is an internal function called by the avg.variog and the Emp.variog function when computing the empirical variogram.

Usage

calc.dist(coord1,coord2,id)

Arguments

coord1
numeric vector containing the longitudes of the meteorological stations.
coord2
vector containing the latitudes of the metereological stations.
id
vector with the id of the metereological stations.

Value

The function returns a square matrix of dimension n by n, where n is the length of the vector coord1 where the (i,j) entry of represents the distance between the i-th and the j-th metereological stations.

Details

This function is an internal function that is used and called by the avg.variog.dir functions when estimating the empirical variogram of a random variable observed at different meteorlogocal stations.

- Defaults - None.