generate_mpp: Generate a marked process given locations and marks

View source: R/generate_mpp.R

generate_mppR Documentation

Generate a marked process given locations and marks

Description

Creates an object of class "ppp" that represents a marked point pattern in the two-dimensional plane.

Usage

generate_mpp(locations, marks = NULL, xy_bounds = NULL)

Arguments

locations

a data.frame or matrix of (x,y) locations. If a data.frame is supplied, it must contain columns named "x" and "y".

marks

a vector of marks.

xy_bounds

a vector of domain bounds (2 for x, 2 for y).

Value

a ppp object with marks.

Examples

# Load example data
data(small_example_data)

# Generate a marked point process
generate_mpp(
  locations = small_example_data %>% dplyr::select(x, y),
  marks = small_example_data$size,
  xy_bounds = c(0, 25, 0, 25)
)


ldmppr documentation built on March 3, 2026, 9:06 a.m.