# \donttest{
## Directory with files
extd.dir <- system.file("extdata", package = "apsimx")
## Comparing observed and simulated for Wheat
data(obsWheat)
sim.opt <- read.csv(file.path(extd.dir, "wheat-sim-opt.csv"))
sim.opt$Date <- as.Date(sim.opt$Date)
cap <- compare_apsim(obsWheat, sim.opt, labels = c("obs", "sim"))
plot(cap)
plot(cap, plot.type = "diff")
plot(cap, plot.type = "resid")
plot(cap, plot.type = "ts")
plot(cap, variable = "AboveGround")
plot(cap, variable = "AboveGround", plot.type = "diff")
plot(cap, variable = "AboveGround", plot.type = "ts")
## Selecting a variable
cap <- compare_apsim(obsWheat, sim.opt, variable = "AboveGround",
labels = c("obs", "sim"))
## Using id
plot(cap, variable = "AboveGround", id = 0.05)
# }
Run the code above in your browser using DataLab