generate_mpp | R Documentation |
Creates an object of class "ppp" that represents a marked point pattern in the two-dimensional plane.
generate_mpp(locations, marks = NULL, xy_bounds = NULL)
locations |
a data frame of (x,y) locations with names "x" and "y". |
marks |
a vector of marks. |
xy_bounds |
a vector of domain bounds (2 for x, 2 for y). |
a ppp object with marks.
# 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)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.