a dataframe or matrix contains columns of predictor variables.
trainy
a vector of response, must have length equal to the number of
rows in trainx.
longlatpredx
a dataframe contains longitude and latitude of point
locations (i.e., the centres of grids) to be predicted.
predx
a dataframe or matrix contains columns of predictive variables
for the grids to be predicted.
mtry
Number of variables to possibly split at in each node. Default is the
(rounded down) square root of the number variables.
num.trees
number of trees. By default, 500 is used.
min.node.size
Default 1 for classification, 5 for regression.
type
Type of prediction. One of 'response', 'se', 'terminalNodes' with
default 'response'. See ranger::predict.ranger for details.
num.threads
number of threads. Default is number of CPUs available.
verbose
Show computation status and estimated runtime.Default is FALSE.
...
other arguments passed on to randomForest.
Value
A dataframe of longitude, latitude and predictions.
References
Wright, M. N. & Ziegler, A. (2017). ranger: A Fast Implementation
of Random Forests for High Dimensional Data in C++ and R. J Stat Softw 77:1-17.
http://dx.doi.org/10.18637/jss.v077.i01.