View source: R/general_helpers.R
groups_gridbased | R Documentation |
This function creates a grid-based neighborhood structure for the ssMRCD
function using cut-off values for two coordinate axis.
groups_gridbased(x, y, cutx, cuty)
x |
vector of first coordinate of data set. |
y |
vector of second coordinate of data set. |
cutx |
cut-offs for first coordinate. |
cuty |
cut-offs for second coordinate. |
Returns a neighborhood assignment vector for the coordinates x
and y
.
# get data
data(weatherAUT2021)
# set cut-off values
cut_lon = c(9:16, 18)
cut_lat = c(46, 47, 47.5, 48, 49)
# create neighborhood assignments
groups_gridbased(weatherAUT2021$lon,
weatherAUT2021$lat,
cut_lon,
cut_lat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.