runScymCore: Run SCYM core: basic 2-window SCYM function based on US maize...

Description Usage Arguments Examples

View source: R/scym_core.R

Description

Function intended to be applied by row to a df of points + attributes

Usage

1
2
runScymCore(days, vi1, vi2, p_hinge, v_hinge, Augtmax, JJA_radn,
  apsimtable = ctable)

Arguments

days

column name for character vector denoting observation days for both windows in format '180_210'

vi1

column name for vi observation in window 1

vi2

column name for vi observation in window 2

p_hinge

column name for precip hinge value

v_hinge

column name for vpd hinge value

Augtmax

column name for augmaxt

apsimtable

data.frame with coefficient table to use

Examples

1
2
3
4
5
6
7
# to apply to data frame using purrr (better than rowwise, etc)
ls2017_yield <- ls2017 %>%
  mutate(biomass_scymr = pmap_dbl(list(days = Dates, vi1 = gcvi1, vi2 = gcvi2,
                                       p_hinge=phinge, v_hinge=vhinge,
                                       Augtmax = Augmaxt, JJA_radn = JJAradn),
                                       .f = runScymCore, apsimtable = ctable),
         yield_SCYMr_tha = biomass_scymr * 0.45)

LobellLab/SCYMr documentation built on Oct. 20, 2020, 1:22 a.m.