subset.modeler: Subset an object of class 'modeler'

View source: R/10_combining.R

subset.modelerR Documentation

Subset an object of class modeler

Description

Subset an object of class modeler

Usage

## S3 method for class 'modeler'
subset(x, id = NULL, ...)

Arguments

x

An object of class modeler, typically the result of calling modeler().

id

Unique identifier to filter a modeler object by a specific group. Default is NULL.

...

Additional parameters for future functionality.

Value

A modeler object.

Author(s)

Johan Aparicio [aut]

Examples

library(flexFitR)
data(dt_potato)
mod <- dt_potato |>
  modeler(
    x = DAP,
    y = Canopy,
    grp = Plot,
    fn = "fn_logistic",
    parameters = c(a = 0.199, t0 = 47.7, k = 100),
    subset = 1:2
  )
print(mod)
mod_new <- subset(mod, id = 2)
print(mod_new)

flexFitR documentation built on April 16, 2025, 5:09 p.m.