Complete Stochastic Modelling Solution
Overview
Makes univariate, multivariate, or random fields simulations precise and simple. Just select the desired time series or random fields’ properties and it will do the rest. CoSMoS is based on the framework described in Papalexiou (2018, doi:10.1016/j.advwatres.2018.02.013), extended for random fields in Papalexiou and Serinaldi (2020, doi:10.1029/2019WR026331), and further advanced in Papalexiou et al. (2021, doi:10.1029/2020WR029466) to allow fine-scale space-time simulation of storms (or even cyclone-mimicking fields).
Internal refactoring — no breaking changes to the public API:
----------------
- Homogenised code style throughout (double-quoted strings, no trailing
return(), 2-space indent, consistent@returnand@seealsotags) - Removed incorrect
@exportfrom internal helpers across 13 files (fixes spurious NAMESPACE entries forAR1,ARp,YW,N,rMSE,MSE,ECDF,optimACS,lmom,erfc,inv.erfc,seasonalACF,seasonalAR,stratifySeasonData,acf*helpers, and allpop*functions) - Merged source files to reduce duplication:
AR1.R+ARp.R->ar-models.RgenerateTS.R->generate-ts.R
Show all changes in 2.2.0Hide the rest of the changes in 2.2.0
generateRF.r+generateMTS.r+generateRFFast.r+generateMTSFast.r->generate-fields.Rggamma.R+paretoII.R+burrXII.R+burrIII.R+gev.R->distributions.Ractf.R+actfInv.R+acti.R->actf.RfitDist.R+fitACS.R+norm.R+errors.R->fitting.RanalyzeTS.R+seasonalACF.R+seasonalAR.R+stratifyData.R->seasonal.R- All S3 plot methods ->
plot-methods.R - Internal utilities ->
utils-internal.R - Fixed pre-existing bugs:
generateTSexample usedp = TRUEinstead ofp = NULL(BUG-06)regenerateTScrashed after AR coefficient attribute rename (BUG-07)regenerateTSapplied AR coefficients in wrong order (BUG-08)qburrXIIoperator-precedence ambiguity (BUG-09)getACSArg/getDistArgfailed when target functions were unexported, due tobase::exists()searching the search path rather than the package namespace; fixed to useasNamespace("CoSMoS")lookup (BUG-10)- Extracted shared
simulate_var()helper from identicalgenerateRF/generateMTSbodies; extractedDHMgenSj/DHMgenSimfrom both Fast functions; removed deadstcsidparameter fromgenerateRFFastandgenerateMTSFast - Fixed
simulateTSto compute probability zero directly from stratified data instead of running the fullreportTSreporting pipeline - Fixed
rbind-in-loop growth pattern inseasonalAR - Fixed all
class(x)[1]comparisons to useinherits()oris.*()per CRAN policy - Removed deprecated
aes_string()calls; replaced withaes()+after_stat()/.data[[]] - Removed dead commented-out code throughout
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 74 (27 internal)includes a package overview page
- Examples that run
- 100%49 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 88%
- Return-value docs
- 61%
- Help pages citing references
- 39%
Downloads
Repository
- PRs merged (all time)
- 80%
- Median days to close, 50 most recently updated closed issues
- 46
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Issues over time
PRs over time
3 development-tooling and community-health practices detected across 2 families in the upstream repository
Checks run against github.com/tychelab/cosmos on 2026-10-22.
Dependencies
Installing CoSMoS adds 36 packages (17 with compiled code, 55 MB of source tarballs). Heaviest: BH 14 MB, ggplot2 6.0 MB, data.table 5.7 MB.
Code & Tests
Datasets
People & History
Previously maintained by Filip Strnad (0.4.1 to 1.1.3).
Pick two releases to compare their code metrics.
- 2.2.0Latest2026-05-07 · current release · diff ↗ ·
removed 27 exports
AR1, ARp, ECDF, MSE, N, YW, acfburrXII, acffgn, acfparetoII, acfweibull, actfdiscreteInv, erfc, getACSArg, getDistArg, inv.erfc, lmom, optimACS, popcvar, popkurt, popmean, popsd, popskew, popvar, rMSE, seasonalACF, seasonalAR, stratifySeasonDataadded 1 export
actpntsB6 - RR 4.6.0 released · 2026-04-24
- 2.1.22026-01-27 · diff ↗
- 2.1.12025-08-23 · diff ↗
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- 2.1.02021-05-30 · diff ↗ ·
added 11 exports
advectionF, advectionFhyperbolic, advectionFradial, advectionFrotation, advectionFspiral, advectionFspiralCE, advectionFuniform, anisotropyT, anisotropyTaffine, anisotropyTswirl, anisotropyTwave - RR 4.1.0 released · 2021-05-18
- 2.0.02020-07-16 · diff ↗ ·
added 13 exports
actfInv, actfdiscreteInv, checkRF, fitVAR, generateMTS, generateMTSFast, generateRF, generateRFFast, quickTSPlot, stcfclayton, stcfgneiting14, stcfgneiting16, stcs - RR 4.0.0 released · 2020-04-24
- unarchivedReturned to CRAN2020-04-01
- 1.1.3
- archivedRemoved from CRAN2020-03-22check problems were not corrected in time
- 1.0.12019-05-09 · diff ↗ ·
removed 3 exports
checkmodel, checkplot, checksimulationadded 19 exports
ECDF, MSE, N, YW, analyzeTS, checkTS, fitACS, fitDist, getACSArg, getDistArg, lmom, optimACS, rMSE, reportTS, sample.moments, seasonalACF, seasonalAR, simulateTS, stratifySeasonData
Show 3 earlier eventsHide 3 earlier events
- RR 3.6.0 released · 2019-04-26
- 0.4.12019-04-11
- RR 3.5.0 released · 2018-04-23
Package metadata
- First published
- 2019-04-11
- Total releases
- 8 / 7 yrs
- License
- GPL-3 OSI · relicensed from AGPL-3 in 2.2.0
- Minimum R
- ≥ 3.5.0
- Bundled data
- 311 KB / 2 files
- Download size
- 4.8 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("CoSMoS")The package provides a citation file that builds its entry when R runs it. Run citation() to see it.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.