spatial_knn | R Documentation |
Add spatial k nearest neighbor (sknn) values
spatial_knn(x, vars, k = 3, lon = "lon", lat = "lat", suffix = "_lag")
x |
A data frame with variables for lon and lat |
vars |
A vector of variables to regress with sknn |
k |
The value for 3, default 3 |
lon |
The lon variable |
lat |
The lat variable |
suffix |
The suffix to use, default "_lag" |
A data frame with added variables
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.