format_ppp | R Documentation |
This function is a wrapper around the spatstat.geom::ppp()
function and
it is used to transform STATS19 data into a ppp format.
format_ppp(data, window = NULL, ...)
data |
A STATS19 dataframe to be converted into ppp format. |
window |
A windows of observation, an object of class |
... |
Additional parameters that should be passed to
|
A ppp object.
format_sf
for an analogous function used to convert
data into sf format and spatstat.geom::ppp()
for the original function.
if (requireNamespace("spatstat.geom", quietly = TRUE)) {
x_ppp = format_ppp(accidents_sample)
x_ppp
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.