Skip to content

ForestElementsR

3.0.0Package record

Data Structures and Functions for Working with Forest Data

1packages depend
3.3Kdownloads / year
50.2%test coverage
13/13flavors OK

Overview

About

Provides generic data structures and algorithms for use with forest mensuration data in a consistent framework. The functions and objects included are a collection of broadly applicable tools. More specialized applications should be implemented in separate packages that build on this foundation. Documentation about 'ForestElementsR' is provided by three vignettes included in this package. For an introduction to the field of forest mensuration, refer to the textbooks by Kershaw et al. (2017) doi:10.1002/9781118902028, and van Laar and Akca (2007) doi:10.1007/978-1-4020-5991-9.

Changes in 3.0.0

Major overhaul of the species coding system.

  • Species codings may now be **hierarchical**: a species can appear both as an individual code and inside one or more coarser group codes of the same coding (a laminar family of species sets). Coding tables gained a level column (0 = finest leaf, higher numbers = coarser groups). bavrn_state and tum_wwk_long are now hierarchical.
  • Codings may carry **non-tree codes** — categories without a tree-species equivalent, such as the Bavarian state code 99 ("Strauch", shrub). Whether a code is a tree code is **derived** from its link to the species_master_table, so there is no separate flag to keep in sync. New exported helpers fe_species_is_tree() and fe_species_non_tree_codes() report this.
Show all changes in 3.0.0Hide the rest of the changes in 3.0.0
  • fe_stand() and its spatial children now **reject** non-tree species codes with a clear error.
  • Casting a non-tree code into another coding yields NA (with a message) instead of raising an error.
  • **Casting** into a hierarchical coding resolves each species to the finest code that contains it. A cast that loses information (aggregating finer codes into a coarser group) is now signalled with a **message** instead of a **warning**; forward-ambiguous casts still raise an error. A small documented dataset, species_cast_overrides, declares deliberate target codes for otherwise forward-ambiguous casts.
  • New exported, CSV-driven builders for maintaining the codings and the master table: master_template_csv(), master_table_from_csv(), coding_template_from_master(), coding_table_from_template(), and cast_overrides_from_csv(). Coding tables are now stored in a canonical row order (level, then code, then master key), and the builder rejects inconsistent or conflicting entries early.
  • Extended the species data: new Bavarian state forest species and codes, tum_wwk_long filled out with grouping levels and now covering all master species, and additional master species (e.g. the genera *Cedrus* and *Corylus*).
  • Added two cast overrides for bavrn_state -> tum_wwk_short: the oak group code 70 ("Eiche (Gruppe)") now resolves to 6 (oak), and the "other hardwood" code 80 ("Sonstige Laubhölzer") to 8 (other hardwood). Both casts were forward-ambiguous (70 straddles {6, 8} via red oak, 80 straddles {8, 9} hard/soft broadleaf) and therefore errored. This unblocks downstream casting of BaySF inventory data carrying these group codes.
  • New exported helper fe_species_get_field_table() returns a compact, field-usable lookup table for a coding: each code exactly once, with the coding's own species/group names (all three languages), plus the level and is_tree columns, in canonical order. Rendering it into a printable document is left to downstream packages.
  • The "Tree Species Codings" vignette was updated to cover the overhauled system: hierarchical codings and the level column, non-tree codes and is_tree, the finest-node cast and the cast-override mechanism, the cast information-loss message (formerly a warning), the new field table, and a rewritten "Information for developers" part documenting the CSV-driven builder workflow.

Other news

  • Exported the object validation helpers has_required_names, has_required_types_or_classes, has_no_missing_values, and is_distinct (previously internal). They remain marked with @keywords internal, but are now part of the public interface so that dependent packages (e.g. FeNEU) can call them with :: instead of relying on the non-exported ::: mechanism, which is not permitted on CRAN.
  • Promoted wood_density_tum_wwk_short from an internal object (in sysdata.rda) to a documented, exported dataset. It is now accessible as ForestElementsR::wood_density_tum_wwk_short.

***

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 5.2 min · r-release-macos-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
  • ERROR12 OK, 1 ERROR2026-06-08
  • OK13 OK2026-05-07
Show 2 earlier changesHide 2 earlier changes
  • ERROR12 OK, 1 ERROR2026-05-05
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 3.0.0
READMEYes · 1,740 wordsVignettesYes · 3 · dynamicNEWSYes · 100% structured · mentions 3.0.0Citation fileNoWebsitenot declared in DESCRIPTION
Help pages
165 (37 internal)
Examples that run
100%124 run in a plain check
Exported functions with examples
95%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
10% with a bibliography file

Downloads

3.3K
CRAN downloads in the past year
Rank #9,286 · ~9/day · ~273/mo
Daily download trend is not available in this view yet.
37130 days
1.1K90 days
3.3K1 year
Compare downloads with other packages →
Also on108 r2u6 autocran

Dependencies

Declared dependencies
16 external dependencies (excludes base and recommended)

Installing ForestElementsR adds 54 packages (33 with compiled code, 59 MB of source tarballs). Heaviest: stringi 11 MB, sf 9.3 MB, ggplot2 6.0 MB.

Depends (2)
R >= 4.4sf
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
1direct
0indirect
Depends 1
Depends, Imports or LinkingTo, most downloaded first

Datasets

People & History

People (3)
Author, Maintainer since 2.0.1 (2024), Copyright holder
Contributor
Releases (4)

Pick two releases to compare their code metrics.

  • 3.0.0Latest
    record
    2026-06-29 · current release · diff ↗ ·
    added 12 exports
    cast_overrides_from_csv, coding_table_from_template, coding_template_from_master, fe_species_get_field_table, fe_species_is_tree, fe_species_non_tree_codes, has_no_missing_values, has_required_names, has_required_types_or_classes, is_distinct, master_table_from_csv, master_template_csv
  • R
    R 4.6.0 released · 2026-04-24
  • 2.2.0
    record
    2025-10-29 · diff ↗ ·
    added 1 export
    get_center
  • R
    R 4.5.0 released · 2025-04-11
  • 2.1.0
    record
    2025-02-07 · diff ↗
  • 2.0.1
    record
    2024-12-23
  • R
    R 4.4.0 released · 2024-04-24

Package metadata

First published
2024-12-23
Total releases
4 / 2 yrs
License
GPL (>= 3) OSI
Minimum R
≥ 4.4
Bundled data
125 KB / 40 files
Download size
1.6 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("ForestElementsR")
Biber, P., Hilmers, T., & Toraño Caicoya, A. (2026). ForestElementsR: Data Structures and Functions for Working with Forest Data (Version 3.0.0) [Computer software]. https://doi.org/10.32614/CRAN.package.ForestElementsR

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 ForestElementsR version 3.0.0 [Data set]. HJJB, LLC. Data release v2026-10-24. https://doi.org/10.5281/zenodo.21843040

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.

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