## ----wofost_0----------------------------------------------------------------- library(Rwofost) f <- system.file("extdata/Netherlands_Swifterbant.csv", package="meteor") wth <- read.csv(f) wth$date <- as.Date(wth$date) head(wth) ## ----wofost_11---------------------------------------------------------------- crop <- wofost_crop("barley") ## ----wofost_20---------------------------------------------------------------- soil <- wofost_soil('ec1') ## ----wofost_30---------------------------------------------------------------- contr <- wofost_control() contr$modelstart <- as.Date("1976-02-06") ## ----wofost_42---------------------------------------------------------------- out <- wofost(crop, wth, soil, contr) ## ----wofost_43---------------------------------------------------------------- m <- wofost_model(crop, wth, soil, contr) ## ----wofost_45---------------------------------------------------------------- d <- run(m) ## ----wofost_50---------------------------------------------------------------- head(d) tail(d) plot(d[,'step'], d[, 'LAI'])