update.external_dendroMetrics: Update a stored external_dendroMetrics call

update.external_dendroMetricsR Documentation

Update a stored external_dendroMetrics call

Description

Rebuild the call stored in a previous external_dendroMetrics result, optionally replace named arguments, and either evaluate the updated call or return it unevaluated.

Usage

## S3 method for class 'external_dendroMetrics'
update(object, 
    ..., evaluate = TRUE)

Arguments

object

Object returned by external_dendroMetrics().

...

Named arguments used to replace entries in the stored call.

evaluate

If TRUE, evaluate the updated call; otherwise return the call.

Details

The method checks that object inherits from "external_dendroMetrics" and that the original matched call is stored in attr(object, "call"). It then replaces any named arguments supplied in "..." inside that stored call.

Use evaluate = FALSE to inspect the reconstructed call before execution. This is useful when debugging filters, grouping variables, schemas, or volume-method options. The method only changes arguments supplied explicitly in "..."; all other arguments remain as stored in the original call.

Value

A new external_dendroMetrics object when evaluate = TRUE; otherwise the updated call.

Author(s)

Wilson Lara [aut, cre] (ORCID: <https://orcid.org/0000-0003-3527-1380>), Cristobal Ordonez [aut] (ORCID: <https://orcid.org/0000-0001-5354-3760>), Aitor Vázquez-Veloso [aut] (ORCID: <https://orcid.org/0000-0003-0227-506X>), Felipe Bravo [aut] (ORCID: <https://orcid.org/0000-0001-7348-6695>)

Examples

x <- structure(
    data.frame(plot = "P1", d = 12, h = 8),
    class = c("external_dendroMetrics", "dendroMetrics", "data.frame")
)

attr(x, "call") <- quote(
    external_dendroMetrics(
        x = data.frame(plot = "P1", d = 12, h = 8),
        var = c("d", "h"),
        summ.vr = NULL
    )
)

update(x, var = c("d", "h", "ba"), evaluate = FALSE)

basifoR documentation built on Aug. 26, 2026, 9:06 a.m.