Learn R Programming

transport (version 0.15-4)

pgrid: Constructor for the pgrid Class

Description

Construct an object of class "pgrid" from a matrix or a higher-dimensional array.

Usage

pgrid(mass, boundary, gridtriple, generator, structure)

Arguments

mass

a matrix or higher-dimensional array specifing the masses in each pixel / at each pixel centre.

boundary, gridtriple, generator

arguments specifying the positions of the pixels. At most one of these can be specified.

structure

optional character string specifying the structure of the grid. Currently only "square" and "rectangular" make sense, and are derrived automatically from the dimensions of mass.

Author

Dominic Schuhmacher dschuhm1@uni-goettingen.de

Details

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

See Also

Description of pgrid objects.

Examples

Run this code
m <- matrix(1:20, 4, 5)
a <- pgrid(m)
print(a)
print.default(a)

if (FALSE) {  
  plot(a, rot=TRUE)}

Run the code above in your browser using DataLab