Extract.layered {spatstat}R Documentation

Extract Subset of a Layered Object

Description

Extract some or all of the layers of a layered object, or extract a spatial subset of each layer.

Usage

  ## S3 method for class 'layered'
x[i, j, drop=FALSE, ...]

Arguments

x

A layered object (class "layered").

i

Subset index for the list of layers. A logical vector, integer vector or character vector specifying which layers are to be retained.

j

Subset index to be applied to the data in each layer. Typically a spatial window (class "owin").

drop

Logical. If i specifies only a single layer and drop=TRUE, then the contents of this layer will be returned.

...

Ignored.

Details

A layered object represents data that should be plotted in successive layers, for example, a background and a foreground. See layered.

This function extracts a designated subset of a layered object. It is a method for [ for the class "layered".

The index i specifies which layers will be retained. It should be a valid subset index for the list of layers.

The index j will be applied to each layer. It is typically a spatial window (class "owin") so that each of the layers will be restricted to the same spatial region. Alternatively j may be any subset index which is permissible for the "[" method for each of the layers.

Value

Usually an object of class "layered".

Author(s)

Adrian Baddeley Adrian.Baddeley@uwa.edu.au http://www.maths.uwa.edu.au/~adrian/ and Rolf Turner r.turner@auckland.ac.nz

See Also

layered

Examples

 example(layered)
 L[-2]
 L[, square(0.5)]

[Package spatstat version 1.38-1 Index]