Original data from Crep calculator (See Martin et al., 2017)

get_vdm(time, model)

Arguments

time

time (a)

model

model to be used (one of musch, glopis or lsd)

Examples

get_vdm
#> function (time, model) 
#> {
#>     if (!(model %in% c("musch", "glopis", "lsd"))) {
#>         stop("Argument model must be one of musch, glopis or lsd")
#>     }
#>     val = 0
#>     if (model == "musch") {
#>         if (max(time) > max(GMDB$musch[1, ] * 1000)) {
#>             val = mean(GMDB$musch[2, GMDB$musch[1, ] > 1800]) * 
#>                 1e+22
#>         }
#>         vdm = approx(GMDB$musch[1, ] * 1000, GMDB$musch[2, ] * 
#>             1e+22, time, yright = val)$y
#>     }
#>     else if (model == "glopis") {
#>         if (max(time) > max(GMDB$glopis[1, ] * 1000)) {
#>             val = mean(GMDB$glopis[2, GMDB$glopis[1, ] > 1800]) * 
#>                 1e+22
#>         }
#>         vdm = approx(GMDB$glopis[1, ] * 1000, GMDB$glopis[2, 
#>             ] * 1e+22, time, yright = val)$y
#>     }
#>     else {
#>         if (max(time) > max(GMDB$lsd[1, ] * 1000)) {
#>             val = mean(GMDB$lsd[2, GMDB$lsd[1, ] > 1800]) * 1e+22
#>         }
#>         vdm = approx(GMDB$lsd[1, ] * 1000, GMDB$lsd[2, ] * 1e+22, 
#>             time, yright = val)$y
#>     }
#>     return(vdm)
#> }
#> <bytecode: 0x56376fb13fc8>
#> <environment: namespace:TCNtools>