s2pp: Spherical point pattern

View source: R/s2pp.R

s2ppR Documentation

Spherical point pattern

Description

Make an object of class "s2pp" representing a point pattern over a region on the sphere (of class "s2region").

Usage

s2pp(coords, region = NULL, marks = NULL, ..., check = TRUE)

Arguments

coords

data.frame, matrix or list. Object containing spherical coordinates of the points. This must be either longitude and latitude in degrees or 3D Cartesian coordinates. In the former case two named columns or list entries are required. In the latter three colums or list entries are required and assumed to be in x, y, z order (disregarding any names).

region

Region on the sphere where the points occur. Object of class "s2region".

marks

Marks attached to the points.

...

Arguments passed on to s2

radius

Numeric. Defaults to 1. For convenience this can also be an object of class "s2region" from where the radius and unitname then will be extracted.

unitname

Optional. Name of unit of length. Either a single character string, or a vector of two character strings giving the singular and plural forms, respectively.

check

Logical. Check that points actually are inside the provided region.

Value

Object of class "s2pp".

Examples

long <- c(90, 180, -90)
lat <- c(45, 0, -45)
coords <- data.frame(long, lat)
X <- s2pp(coords)


spatstat/spatstat.sphere documentation built on Jan. 27, 2023, 2:59 a.m.