Learn R Programming

vectools (version 0.3.0)

22_GeomArray: Geometric Arrays

Description

A GeomArray is a subclass of ObjectArray for storing GeomObject(s).

Note that GeomArray is also a GeomObject, and contain other GeomArray(s). i.e. They can be recursive.

NOTE: INTERNAL STRUCTURE OF OBJECTS IS SUBJECT TO CHANGE. DO NOT USE SLOTS, DIRECTLY.

Usage

GeomArray (n, …, D)

GeomArray2 (n) GeomArray3 (n)

as.GeomArray (v, …, n, D)

Arguments

n

Single integer, the dimensions. Currently, restricted to one dimensional arrays.

D

Integer, two or three, for the number of spatial dimensions. Any elements in the GeomArray will need to match this. For the as function, D is optional but all elements need to match.

v

A list of GeomObject(s).

Ignored.

Value

A GeomObject.

See Also

VMap Another subclass of ObjectArray.

PartMatrix Similar to NestMatrix.

SectMatrix A generalization of PartMatrix

Subsetting Operators

Standard Methods

Binary Operators Operations on MatrixArray objects.

Examples

Run this code
# NOT RUN {
#explicit construction
v <- GeomArray (2, D=2)
v [[1]] <- regPolygon (6, d=1)
v [[2]] <- regPolygon (6, d=2)
plot (v)

#construction via matrix array multiplication
v <- regPolygon (6, d=1) 
# }
# NOT RUN {
<!-- %]*% bscl2 (1:2) -->
# }
# NOT RUN {
plot (v)
# }

Run the code above in your browser using DataLab