Skip to content

spatialRF

Easy Spatial Modeling with Random Forest

v1.1.5 · Dec 19, 2025 · MIT + file LICENSE

Description

Automatic generation and selection of spatial predictors for Random Forest models fitted to spatially structured data. Spatial predictors are constructed from a distance matrix among training samples using Moran's Eigenvector Maps (MEMs; Dray, Legendre, and Peres-Neto 2006 <DOI:10.1016/j.ecolmodel.2006.02.015>) or the RFsp approach (Hengl et al. <DOI:10.7717/peerj.5518>). These predictors are used alongside user-supplied explanatory variables in Random Forest models. The package provides functions for model fitting, multicollinearity reduction, interaction identification, hyperparameter tuning, evaluation via spatial cross-validation, and result visualization using partial dependence and interaction plots. Model fitting relies on the 'ranger' package (Wright and Ziegler 2017 <DOI:10.18637/jss.v077.i01>).

Downloads

455

Last 30 days

7818th

455

Last 90 days

455

Last year

CRAN Check Status

3 NOTE
11 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 NOTE
r-oldrel-macos-x86_64 NOTE
r-oldrel-windows-x86_64 NOTE
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (14 non-OK)
OK r-devel-linux-x86_64-debian-clang

*


            
OK r-devel-linux-x86_64-debian-gcc

*


            
OK r-devel-linux-x86_64-fedora-clang

*


            
OK r-devel-linux-x86_64-fedora-gcc

*


            
OK r-devel-macos-arm64

*


            
OK r-devel-windows-x86_64

*


            
NOTE r-oldrel-macos-arm64

installed package size

  installed size is  9.2Mb
  sub-directories of 1Mb or more:
    data   6.1Mb
    help   2.8Mb
NOTE r-oldrel-macos-x86_64

installed package size

  installed size is  9.2Mb
  sub-directories of 1Mb or more:
    data   6.1Mb
    help   2.8Mb
NOTE r-oldrel-windows-x86_64

installed package size

  installed size is  8.2Mb
  sub-directories of 1Mb or more:
    data   5.1Mb
    help   2.8Mb
OK r-patched-linux-x86_64

*


            
OK r-release-linux-x86_64

*


            
OK r-release-macos-arm64

*


            
OK r-release-macos-x86_64

*


            
OK r-release-windows-x86_64

*


            

Check History

NOTE 11 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 9, 2026
NOTE r-oldrel-macos-arm64

installed package size

  installed size is  9.2Mb
  sub-directories of 1Mb or more:
    data   6.1Mb
    help   2.8Mb
NOTE r-oldrel-macos-x86_64

installed package size

  installed size is  9.2Mb
  sub-directories of 1Mb or more:
    data   6.1Mb
    help   2.8Mb
NOTE r-oldrel-windows-x86_64

installed package size

  installed size is  8.2Mb
  sub-directories of 1Mb or more:
    data   5.1Mb
    help   2.8Mb

Dependency Network

Dependencies Reverse dependencies dplyr ggplot2 magrittr tibble foreach doParallel ranger rlang tidyr tidyselect huxtable (>= 5.8.0) patchwork viridis spatialRF

Version History

new 1.1.5 Mar 9, 2026