Skip to content

ecocbo

1.0.0Package record

Calculating Optimum Sampling Effort in Community Ecology

0packages depend
3.1Kdownloads / year
39.6%test coverage
13/13flavors OK

Overview

About

A system for calculating the optimal sampling effort, based on the ideas of "Ecological cost-benefit optimization" as developed by A. Underwood (1997, ISBN 0 521 55696 1). Data is obtained from simulated ecological communities with prep_data() which formats and arranges the initial data, and then the optimization follows the following procedure of four functions: (1) prep_data() takes the original dataset and creates simulated sets that can be used as a basis for estimating statistical power and type II error. (2) sim_beta() is used to estimate the statistical power for the different sampling efforts specified by the user. (3) sim_cbo() calculates then the optimal sampling effort, based on the statistical power and the sampling costs. Additionally, (4) scompvar() calculates the variation components necessary for (5) Underwood_cbo() to calculate the optimal combination of number of sites and samples depending on either an economic budget or on a desired statistical accuracy. Lastly, (6) plot_power() helps the user visualize the results of sim_beta().

Changes in 1.0.0

Major update

  • PERMANOVA refactor: The implementation used by prep_data() now uses a distance-based MANOVA (dbManova...()) pipeline using Gower-centered distance matrices. This replaces the previous SS calculations based on Huygens' theorem
  • The new approach is numerically more stable, especially with non-Euclidean distances (e.g., Bray–Curtis), where negative eigenvalues can invalidate naive SS partitions.
  • Sums of squares are obtained from projection matrices in the PCoA space (SSCP traces), with correct handling of negative eigenvalues (sign weighting), avoiding drift due to rounding/centering errors.
  • Results are therefore more robust and interpretable across a wider range of ecological distances.

Notes on compatibility

The user API of prep_data() remains the same. Small numerical differences may occur due to more correct SS partitioning.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 3.5 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
  • ERROR12 OK, 1 ERROR2026-06-08
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.0.0
READMEYes · 272 wordsVignettesYes · 1 · dynamicNEWSYes · 100% structured · mentions 1.0.0Citation fileNoWebsitenot declared in DESCRIPTION
Help pages
19 (5 internal)includes a package overview page
Examples that run
100%7 run in a plain check
Exported functions with examples
100%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
53%
Vignettes (1)

Downloads

3.1K
CRAN downloads in the past year
Rank #15,659 · ~9/day · ~262/mo
Daily download trend is not available in this view yet.
32930 days
77390 days
3.1K1 year
Compare downloads with other packages →
Also on92 r2u10 autocran

Repository

0Stars
1Forks
0Open issues
0Open PRs
0Releases
99Commits
2Commit identities
License file reads as GPL-3.0 · 99 commits · Last activity 2026-03-28
Responsiveness
How these are sampled
PRs merged (all time)
89%
Median days to close, 50 most recently updated closed issues
not measured
Median days to close, 50 most recently updated closed PRs
0

Forks over time

2024-01-31 · 12026-07-07 · 1
PracticesBeta

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

Checks run against github.com/arturosp/ecocbo on 2026-10-11.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (1)
README.Rmd
Reproducibility and dev environment (1)
data-raw/
CRAN release process (3)
cran-comments.mdrevdep/CRAN-SUBMISSION
Show all practicesHide 1 practice
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
15 external dependencies (excludes base and recommended)

Installing ecocbo adds 117 packages (59 with compiled code, 102 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, data.table 5.7 MB.

Depends (1)
R >= 4.1.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (2)
Author, Maintainer since 0.10.2 (2023)
Author, Copyright holder
Releases (4)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 1.0.0Latest
    record
    2025-11-22 · current release · diff ↗
  • 0.13.0
    record
    2025-08-23 · diff ↗ ·
    removed 7 exports
    SS, balanced_sampling, balanced_sampling2, permanova_oneway, permanova_twoway, prep_data_nestedsymmetric, prep_data_single
    added 1 export
    Underwood_cbo
  • R
    R 4.5.0 released · 2025-04-11
  • 0.12.0
    record
    2024-08-21 · diff ↗ ·
    added 6 exports
    SS, balanced_sampling2, permanova_twoway, prep_data, prep_data_nestedsymmetric, prep_data_single
  • R
    R 4.4.0 released · 2024-04-24
  • 0.10.2
    record
    2023-08-18
  • R
    R 4.3.0 released · 2023-04-21

Package metadata

First published
2023-08-18
Total releases
4 / 3 yrs
License
GPL (>= 3) OSI
Minimum R
≥ 4.1.0
Bundled data
1.6 MB / 7 files
Download size
1.9 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("ecocbo")
Sanchez-Porras, A., & Guerra-Castro, E. (2025). ecocbo: Calculating Optimum Sampling Effort in Community Ecology (Version 1.0.0) [Computer software]. https://doi.org/10.32614/CRAN.package.ecocbo

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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for ecocbo version 1.0.0 [Data set]. HJJB, LLC. Data release v2026-10-18. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy