ppx: Multidimensional Space-Time Point Pattern

ppxR Documentation

Multidimensional Space-Time Point Pattern

Description

Creates a multidimensional space-time point pattern with any kind of coordinates and marks.

Usage

ppx(data, domain=NULL, coord.type=NULL, simplify=FALSE)

Arguments

data

The coordinates and marks of the points. A data.frame or hyperframe.

domain

Optional. The space-time domain containing the points. An object in some appropriate format, or NULL.

coord.type

Character vector specifying how each column of data should be interpreted: as a spatial coordinate, a temporal coordinate, a local coordinate or a mark. Entries are partially matched to the values "spatial", "temporal", "local" and "mark".

simplify

Logical value indicating whether to simplify the result in special cases. If simplify=TRUE, a two-dimensional point pattern will be returned as an object of class "ppp", and a three-dimensional point pattern will be returned as an object of class "pp3". If simplify=FALSE (the default) then the result is always an object of class "ppx".

Details

An object of class "ppx" represents a marked point pattern in multidimensional space and/or time. There may be any number of spatial coordinates, any number of temporal coordinates, any number of local coordinates, and any number of mark variables. The individual marks may be atomic (numeric values, factor values, etc) or objects of any kind.

The argument data should contain the coordinates and marks of the points. It should be a data.frame or more generally a hyperframe (see hyperframe) with one row of data for each point.

Each column of data is either a spatial coordinate, a temporal coordinate, a local coordinate, or a mark variable. The argument coord.type determines how each column is interpreted. It should be a character vector, of length equal to the number of columns of data. It should contain strings that partially match the values "spatial", "temporal", "local" and "mark". (The first letters will be sufficient.)

By default (if coord.type is missing or NULL), columns of numerical data are assumed to represent spatial coordinates, while other columns are assumed to be marks.

Value

Usually an object of class "ppx". If simplify=TRUE the result may be an object of class "ppp" or "pp3".

Author(s)

\adrian

and \rolf

See Also

pp3, print.ppx

Examples

   df <- data.frame(x=runif(4),y=runif(4),t=runif(4),
                    age=rep(c("old", "new"), 2),
                    size=runif(4))
   X <- ppx(data=df, coord.type=c("s","s","t","m","m"))
   X

   #' one-dimensional points
   #' with marks which are two-dimensional point patterns
   val <- sample(10:20, 4)
   E <- lapply(val, runifrect)
   E
   hf <- hyperframe(num=val, e=as.listof(E))
   Z <- ppx(data=hf, domain=c(10,20))
   Z

spatstat.geom documentation built on Sept. 18, 2024, 9:08 a.m.