The goal of rspatialtransform is to transform spatially correlated data to independent data to be used in machine learning models.
You can install the development version of rspatialtransform from GitHub with:
# install.packages('devtools')
devtools::install_github('amillane/rspatialtransform')
This is a basic example which shows you how to implement the transformation:
## usage example
library(rspatialtransform)
transform_to_ind <- function(y~.,
trainData,
trainLocs,
testData, #Don't include response
testLocs,
MaternParams=(range,nug),
smoothness=1/2,
M = 30, #num neighbors
ncores=detectCores()-10)