Skip to content

CAST

1.1.1

'caret' Applications for Spatial-Temporal Models

4packages depend
40.3Kdownloads / year
71.6%test coverage
13/13checks pass

Overview

About
Maintained by Hanna MeyerFirst published 2018-01-0923 releasesCRAN page ↗GitHub ↗

Supporting functionality to run 'caret' with spatial or spatial-temporal data. 'caret' is a frequently used package for model training and prediction using machine learning. CAST includes functions to improve spatial or spatial-temporal modelling tasks using 'caret'. It includes the newly suggested 'Nearest neighbor distance matching' cross-validation to estimate the performance of spatial prediction models and allows for spatial variable selection to selects suitable predictor variables in view to their contribution to the spatial model performance. CAST further includes functionality to estimate the (spatial) area of applicability of prediction models. Methods are described in Meyer et al. (2018) doi:10.1016/j.envsoft.2017.12.001; Meyer et al. (2019) doi:10.1016/j.ecolmodel.2019.108815; Meyer and Pebesma (2021) doi:10.1111/2041-210X.13650; Milà et al. (2022) doi:10.1111/2041-210X.13851; Meyer and Pebesma (2022) doi:10.1038/s41467-022-29838-9; Linnenbrink et al. (2024) doi:10.5194/gmd-17-5897-2024; Schumacher et al. (2025) doi:10.5194/gmd-18-10185-2025. The package is described in detail in Meyer et al. (2026) doi:10.1007/978-3-031-99665-8_11.

Install

Health

CRAN checks
13OK
Slowest check: 16.7 min · r-devel-linux-x86_64-fedora-clang
Code health
Yes
Tests · ratio 0.31
71.6%
Coverage · measured lines
100%
Documentation · exports
14
Dependencies · direct
Check history
  • OK2026-07-16
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-06-17
    10 OK · 0 NOTE · 0 WARNING · 3 ERROR · 0 FAILURE
  • OK2026-06-09
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-06-08
    12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-05-07
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
Show 12 earlier snapshots
  • ERROR2026-04-22
    13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-04-20
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-04-18
    13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-04-15
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-04-11
    13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-04-09
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-03-31
    13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-03-30
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-03-19
    13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-03-17
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-03-12
    13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-03-10
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMEYes · 650 wordsVignettesYes · dynamicpkgdown siteNoNEWSYes · 100% structuredCode of conductNoContributing guideNo
Examples that run
31%
Documented parameters
98%
Return-value docs
71%
References docs
48%

Downloads

40.3K
CRAN downloads in the past year
Rank #2,141 · ~110/day · ~3.4K/mo
Daily download trend is not available in this view yet.
2.4K30 days
11.2K90 days
40.3K1 year
Compare downloads with other packages →
Also on426 r2u34 autocran28 c2d4u

Repository

Repository
137Stars
37Forks
6Open issues
4Open PRs
1Releases
804Commits
17Contributors
caretmachine-learningautocorrelationspatialspatio-temporaloverfittingfeature-selectionvariable-selection
804 commits · Last activity 2026-07-14 · +3% stars, 30d

Stars over time

2025-07-18 · 1182026-07-15 · 137

Repository practices

Upstream repositoryBeta

5 development-tooling and community-health practices detected across 5 families in the upstream repository

Checks run against github.com/hannameyer/cast on 2026-07-19.

Continuous integration (1)
GitHub Actions
Reproducibility and dev environment (1)
data-raw/
Automation and maintenance (1)
Dependabot
Lint, format, editor (1)
RStudio project
Show all practices
Coverage (1)
Codecov
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
24 external dependencies (excludes base and recommended)
Depends (1)
R >= 4.1.0
Imports (14)
caretdata.tableFNNggplot2graphicsgrDevicesmethodsparallelsfstatstwosamplesterrautilszoo
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
4direct
0indirect

Code & Tests

Code Composition
R 7,893 (60%)Rd 2,044 (16%)Vignettes 1,610 (12%)HTML 1,531 (12%)
Code characteristics
Object systems
S316
Cyclomatic complexity
6.0 median / 68 max
Test cases
82 / 0.31 per code line

Test coverage

Line coverage

72%

Expression

75.0%

Tests / Examples

71.6% / 14% ex

Functions

54 17 exported

Complexity

11.3 avg / 68 max

Call network

54 nodes / 43 edges

Loading call graph…

Lowest coverage

54 functions
FunctionCycloCoverage
show.aoa exp10%
show.ffs exp10%
show.knndm exp10%
show.nndm exp10%
show.trainDI exp10%
aoa.Raster10%

Datasets

Bundled datasets · 1
NameClassRows × ColsAlso ships in
cookfarmdata.frame128,545 × 17

People & History

People (11)
Maintainer (1)
Maintainer, Author
Authors (5)
Maintainer, Author
Author · added in 0.7.1
Author · added in 0.2.0
Author · added in 0.7.0
Author · added in 1.0.0
Contributors (6)
Contributor · added in 1.1.0
Contributor
Contributor · added in 1.0.3
Contributor · added in 0.7.1
Contributor · added in 0.4.1
Contributor
Package Timeline

23 releases. Pick two to compare their code metrics. R releases are shown for context.

  • 1.1.1Latest
    2026-07-15 · current release · diff ↗
  • 1.1.0
    2026-06-19 · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • 1.0.4
    2026-01-26 · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • 1.0.3
    2025-01-10 · diff ↗
  • 1.0.2
    2024-06-15 · diff ↗
  • 1.0.1
    2024-04-25 · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • 1.0.0
    2024-04-08 · diff ↗
  • 0.9.0
    2024-01-09 · diff ↗
  • 0.8.1
    2023-05-30 · diff ↗
  • 0.8.0
    2023-05-21 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • 0.7.1
    2023-02-04 · diff ↗
  • 0.7.0
    2022-08-24 · diff ↗
Show 17 earlier events
  • R
    R 4.2.0 released · 2022-04-22
  • 0.6.0
    2022-03-17 · diff ↗
  • R
    R 4.1.0 released · 2021-05-18
  • 0.5.1
    2021-04-07 · diff ↗
  • 0.5.0
    2021-02-19 · diff ↗
  • 0.4.2
    2020-07-17 · diff ↗
  • 0.4.1
    2020-05-19 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • 0.4.0
    2020-04-06 · diff ↗
  • R
    R 3.6.0 released · 2019-04-26
  • 0.3.1
    2018-11-19 · diff ↗
  • 0.3.0
    2018-10-11 · diff ↗
  • 0.2.1
    2018-07-12 · diff ↗
  • 0.2.0
    2018-05-03 · diff ↗
  • R
    R 3.5.0 released · 2018-04-23
  • 0.1.0
    2018-01-09
  • R
    R 3.4.0 released · 2017-04-21

Package metadata

First published
2018-01-09
Total releases
23 / 8 yrs
License
GPL (>= 2) OSI
Minimum R
≥ 4.1.0
Bundled data
254 KB / 2 files
Download size
4.6 MB
Installed size
not tracked yet
With dependencies
not tracked yet
Appears in task views
Report a problem with this page →