View source: R/helper_functions_application.R

N_structure_gridbased | R Documentation |

This function creates a grid-based neighborhood structure for the `ssMRCD`

function using cut-off values for two coordinate axis.

```
N_structure_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
N_structure_gridbased(weatherAUT2021$lon,
weatherAUT2021$lat,
cut_lon,
cut_lat)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.