## ----setup, include=FALSE------------------------------------------------ ## ------------------------------------------------------------------------ library(Rwofost) w <- example_weather() # radiation should be in kJ w$srad <- w$srad * 1000 head(w) ## ------------------------------------------------------------------------ crop <- wofost_crop('barley') ## ------------------------------------------------------------------------ soil <- wofost_soil('ec1') ## ------------------------------------------------------------------------ contr <- wofost_control() contr$modelstart <- as.Date("2012-02-06") ## ------------------------------------------------------------------------ d <- wofost(crop, w, soil, contr) ## ------------------------------------------------------------------------ head(d) tail(d) plot(d[,'step'], d[, 'LAI'])