View source: R/near.obs.soil.R
near.obs.soil | R Documentation |
The function finds n nearest observations from given locations and at specific depth range from location min depth and creates an object of data.frame class, where first n columns are Euclidean distances to n nearest locations and next n columns are observations at n nearest stations, and rows are given locations. It is based on knn function of package nabor.
near.obs.soil(locations, locations.x.y.md = c(1,2,3), observations, observations.x.y.md = c(1,2,3), zcol = 4, n.obs = 5, depth.range = 0.1, no.obs = 'increase')
locations |
data.frame with x and y coordinates and mid depth columns, or SpatialPoints-class, SpatialPointsDataFrame-class or SpatialPixelsDataFrame-class object. Locations from which distances to observations are calculated. |
locations.x.y.md |
numeric or character vector; Positions or names of the x, y, and mid depth columns in |
observations |
data.frame with x, y, mid depth and observation columns, or SpatialPoints-class or SpatialPointsDataFrame-class object with mid depth and observation columns. Observations to which distances to locations are calculated. |
observations.x.y.md |
numeric or character vector; positions or names of the x, y, and mid depth columns in |
zcol |
numeric or character; Column name or number showing the position of observations in |
n.obs |
numeric; Number of nearest observations to be found. Note that it cannot be larger than number of observations. Default is 5. |
depth.range |
numeric; Depth range from location mid depth in which to search for nearest observations. It is in the mid depth units. Default is 0.1. |
no.obs |
character; Possible values are |
data.frame object. Rows represents given locations. First n.obs
columns are Euclidean distances to n.obs
nearest observations. Next n.obs
columns are observations at n.obs
nearest stations.
The function is intended for soil mapping applications.
ALeksandar Sekulic asekulic@grf.bg.ac.rs, Anatol Helfenstein anatol.helfenstein@wur.nl
knn
near.obs
rfsi
pred.rfsi
tune.rfsi
cv.rfsi
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.