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