Skip to contents

The S3 class QWAdata holds the quantitative wood anatomy (QWA) measurements data produced from ROXAS output files, organised into two components:

Usage

QWAdata(cells = NULL, rings = NULL)

as_QWAdata(x)

Arguments

cells

Data frame with cell-level measurements (optional).

rings

Data frame with ring-level measurements and flags (optional).

x

A named list with any subset of the QWAdata components.

Value

An object of class QWAdata.

Details

  • $cells: cell-level measurements (one row per cell).

  • $rings: ring-level measurements, and possibly also quality flags (one row per annual ring per image).

At least one component must be provided. The components are aligned with their schema (column types and order); columns not in the schema are kept after the schema columns. Aborts on missing, NA or (in $rings) duplicate keys. Warns on missing measurement columns, duplicate cell keys (image, year, xpix, ypix), dating problems, images only in $cells or only in $rings, years with cells but without a rings row, and cno not matching the number of cells. The rings are not completed here: complete_QWAdata() adds the missing rings rows and cno.

The typical workflow builds a QWAdata object incrementally using collect_raw_data(), complete_QWAdata(), and check_QWAdata(). Metadata is kept separately as a QWAmetadata or QWAimages object. Radial profiles are computed separately as QWAprofile objects using calculate_sector_profiles() or calculate_band_profiles().