Support for Spatial Objects Within the 'mlr3' Ecosystem
Overview
Extends the 'mlr3' ML framework with methods for spatial objects. Data storage and prediction are supported for packages 'terra', 'raster' and 'stars'.
- fix:
DataBackendRasterno longer errors with[names<-] incorrect number of nameswhen a subset of layers is read from a shared multi-band source file. - fix:
DataBackendRasterno longer errors when raster layers have partially matching names, e.g.predict_spatial()failed with layers named"test_name"and"test_name2"(#94). - feat:
predict_spatial()supports probability predictions now. Train a classification learner withpredict_type = "prob"to get one raster layer or one vector column per class.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK14 OK2026-04-04
Show 2 earlier changesHide 2 earlier changes
- ERROR13 OK, 1 ERROR2026-04-03
- OK14 OK2026-03-10
Documentation
- Help pages
- 18 (8 internal)includes a package overview page
- Examples that run
- 100%2 run in a plain check (1 of them under a condition)
- Exported functions with examples
- 6%
- Documented parameters
- 91%
- Return-value docs
- 56%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 90%
- Median days to close, 50 most recently updated closed issues
- 11
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
16 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/mlr-org/mlr3spatial on 2026-10-21.
The R CMD check workflow runs on Linux, and on R-devel
Funding links: GitHub Sponsors
The repository owner accepts GitHub Sponsors
GitHub Pages site last deployed 2026-09-23 · The repository has a site deploy workflow
pkgdown site last built 2026-07-14
Show all practicesHide 2 practices
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-03-18Seen in the repository: .claude, CLAUDE.mdNamed in .Rbuildignore: .claude, CLAUDE.mdNamed in .gitignore: .claude, CLAUDE.mdPull request it wrote: opened by a project memberCommits: at least 10 crediting it in the message
- Cursorfirst seen 2026-03-18Named in .Rbuildignore: .cursor
- Gemini CLIfirst seen 2026-03-18Config: a file or ignore line, not recorded which
- Codexfirst seen 2026-09-23Seen in the repository: .codexNamed in .Rbuildignore: .codex
- Claude Fable 53 commits · Jun to Jul 2026
- Claude Opus 4.62 commits · Mar 2026
- Claude Opus 4.82 commits · Jul 2026
- Claude Opus 4.71 commit · Apr 2026
- Claude Opus 51 commit · Sep 2026
Dependencies
Installing mlr3spatial adds 34 packages (20 with compiled code, 34 MB of source tarballs). Heaviest: sf 9.3 MB, data.table 5.7 MB, palmerpenguins 2.9 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 0.7.0Latest
- RR 4.6.0 released · 2026-04-24
- 0.6.1
- 0.6.02025-07-18 · diff ↗
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 0.5.02024-03-09 · diff ↗
- 0.4.12023-05-03 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 0.4.02023-02-27 · diff ↗
- 0.3.1
- 0.3.02022-10-20 · diff ↗
- 0.2.12022-08-25 · diff ↗
- 0.2.02022-08-18 · diff ↗ ·
removed 3 exports
DataBackendVector, demo_stack_rasterbrick, demo_stack_spatrasteradded 23 exports
TaskClassifST, TaskRegrST, as_data_backend.RasterBrick, as_data_backend.RasterStack, as_data_backend.SpatRaster, as_data_backend.stars, as_task_classif_st, as_task_classif_st.DataBackend, as_task_classif_st.TaskClassifST, as_task_classif_st.TaskRegrST, as_task_classif_st.data.frame, as_task_classif_st.sf, as_task_regr_st, as_task_regr_st.DataBackend, as_task_regr_st.TaskClassifST, as_task_regr_st.TaskRegrST, as_task_regr_st.data.frame, as_task_regr_st.sf, factor_layer, generate_stack, mask_stack, numeric_layer, sample_stack - RR 4.2.0 released · 2022-04-22
- 0.1.22022-03-06 · diff ↗
Package metadata
- First published
- 2021-11-16
- Total releases
- 13 / 5 yrs
- License
- LGPL-3 OSI
- Minimum R
- ≥ 3.1.0
- Bundled data
- 5.0 KB / 1 file
- Download size
- 1.8 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("mlr3spatial")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.