Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

locations.inside

Select prediction locations inside borders


Description

Selects the prediction locations located inside a polygon defining borders of a region where prediction is aimed. Typically internally called by geoR functions krige.bayes, krige.conv, ksline.

Usage

locations.inside(locations, borders, as.is = TRUE, ...)

Arguments

locations

a two columns matrix or dqata frame with coordinates of the prediction locations.

borders

a two column matrix or data-frame with coordinates of a polygon defining the borders of the region.

as.is

logical defining if the returned object of of the same type (list, data-frame or matrix) as the provided in locations. If FALSE the function returns a matrix.

...

arguments to be passed to the internal function .geoR_pip and currently not used.

Value

A two columns matrix, data-frame or a list with 2 elements with coordinates of points inside the borders.

See Also

Examples

gr <- pred_grid(parana$borders, by=20)
plot(gr, asp=1, pch="+")
polygon(parana$borders)
gr.in <- locations.inside(gr, parana$borders)
points(gr.in, col=2, pch="+")

geoR

Analysis of Geostatistical Data

v1.8-1
GPL (>= 2)
Authors
Paulo J. Ribeiro Jr [aut, cre] <paulojus@ufpr.br>, Peter J. Diggle [aut, cre] <p.diggle@lancaster.ac.uk> Ole Christensen [ctb], Martin Schlather [ctb], Roger Bivand [ctb], Brian Ripley [ctb]
Initial release
2020-02-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.