Learn R Programming

spatstat.geom (version 3.3-2)

is.multitype.ppp: Test Whether A Point Pattern is Multitype

Description

Tests whether a point pattern has ``marks'' attached to the points which classify the points into several types.

Usage

# S3 method for ppp
is.multitype(X, na.action="warn", ...)

Value

Logical value, equal to TRUE if X is a multitype point pattern.

Arguments

X

Point pattern (object of class "ppp").

na.action

String indicating what to do if NA values are encountered amongst the marks. Options are "warn", "fatal" and "ignore".

...

Ignored.

Author

Adrian Baddeley Adrian.Baddeley@curtin.edu.au

and Rolf Turner rolfturner@posteo.net

Details

``Marks'' are observations attached to each point of a point pattern. For example the longleaf dataset contains the locations of trees, each tree being marked by its diameter; the amacrine dataset gives the locations of cells of two types (on/off) and the type of cell may be regarded as a mark attached to the location of the cell.

This function tests whether the point pattern X contains or involves marked points, and that the marks are a factor. It is a method for the generic function is.multitype.

For example, the amacrine dataset is multitype (there are two types of cells, on and off), but the longleaf dataset is not multitype (the marks are real numbers).

The argument na.action determines what action will be taken if the point pattern has a vector of marks but some or all of the marks are NA. Options are "fatal" to cause a fatal error; "warn" to issue a warning and then return TRUE; and "ignore" to take no action except returning TRUE.

See Also

is.multitype, is.multitype.ppm

Examples

Run this code
   is.multitype(cells)  #FALSE - no marks
   is.multitype(longleaf) #FALSE - real valued marks
   is.multitype(amacrine) #TRUE

Run the code above in your browser using DataLab