standprop_yearly_to_param: Transfer standproperties height, maxlai, sai, densef, age to...

View source: R/standprop_yrly_to_param.R

standprop_yearly_to_paramR Documentation

Transfer standproperties height, maxlai, sai, densef, age to parameter list obeject

Description

Takes a data.frame of yearly stand properties, trims/extends the columns height, maxlai, sai, densef, and age for the years in out_yrs, and updates the provided parameter list.

Usage

standprop_yearly_to_param(standprop_yearly, param_b90, out_yrs)

Arguments

standprop_yearly

A data.frame or data.table with columns 'year', 'height', 'maxlai', 'sai', 'densef', 'age'.

param_b90

A list object to update.

out_yrs

Vector of years for which parameters should be updated.

Value

The param_b90 list-object with updated items maxlai, height, height_ini, sai, sai_ini, densef, densef_ini, age, age_ini.

Examples

param_b90 <- set_paramLWFB90()
dat <- slb1_standprop

years <- 2002:2005
param.new <- standprop_yearly_to_param(dat,
                                       param_b90,
                                       years)

identical(param.new$maxlai, dat$maxlai[dat$year %in% years])
identical(param.new$height, dat$height[dat$year %in% years])

pschmidtwalter/LWFBrook90R documentation built on Jan. 27, 2024, 1:48 p.m.