as_obr: Cast data frame to list-like 'obr' object

View source: R/utils.R

as_obrR Documentation

Cast data frame to list-like obr object

Description

Cast data frame to list-like obr object

Usage

as_obr(x)

Arguments

x

A data frame or list-like object to cast. Must have named elements for "year", "samp_depth", "num_defol", "perc_defol", "num_max_defol", "perc_max_defol", "mean_gsi", "mean_ngsi", "outbreak_status".

Value

x cast to an obr object

Examples

data(dmj_obr)
example_data <- as.data.frame(dmj_obr)
is.obr(example_data)
back_to_obr <- as_obr(example_data)
is.obr(back_to_obr)


dfoliatR documentation built on Aug. 10, 2023, 1:08 a.m.