Learn R Programming

transport (version 0.15-4)

wpp: Constructor for the wpp Class

Description

Construct an object of class "wpp" from a matrix of points and a vector of masses.

Usage

wpp(coordinates, mass)

Arguments

coordinates

a matrix specifying the coordinates of the points. Each row corresponds to a point.

mass

a vector of non-negative values specifying the masses at these points.

Details

For more detailed explanations of the arguments and other components of the returned object of class "wpp", see wpp-object.

It is legitimate to assign mass 0 to individual points in the arguments. However, when constructing the wpp-object such points are deleted. The coordinates of the deleted points can still be accessed via the attribute zeropoints.

See Also

Description of pp objects.

Examples

Run this code
m <- matrix(c(1,1,2,2,3,1,4,2),4,2)
a <- pp(m)
print(a)
print.default(a)

if (FALSE) {  
  plot(a)}

Run the code above in your browser using DataLab