## ----sacks1, message=FALSE---------------------------------------------------- library(geodata) geodata::crop_calendar_sacks(path=".") ## ----sacks15, message=FALSE--------------------------------------------------- r <- geodata::crop_calendar_sacks("maize (main season)", path=".") r ## ----sacks20------------------------------------------------------------------ names(r) ## ----sacks30, fig.width=8, fig.height=5--------------------------------------- plot(r[["harvest"]]) ## ----sacks35, fig.width=8, fig.height=5--------------------------------------- plot(r["harvest.start"]) ## ----sacks40, fig.width=8, fig.height=5--------------------------------------- plot(r["harvest.end"]) ## ----sacks45------------------------------------------------------------------ grep("plant", names(r), value=TRUE) ## ----sacks105, message=FALSE-------------------------------------------------- r2 <- geodata::crop_calendar_sacks("Maize (2nd season)", path=".") r2 ## ----sacks130, fig.width=8, fig.height=5-------------------------------------- plot(r2[["harvest"]]) ## ----sacksf150, fig.width=8, fig.height=5------------------------------------- h1 <- r[["harvest"]] h2 <- r2[["harvest"]] h12 <- !is.na(h1) + !is.na(h2) plot(h12) ## ----sacks152----------------------------------------------------------------- x <- c(h1 > 0, h2 > 0) h12b <- sum(x, na.rm=TRUE) ## ----rice1-------------------------------------------------------------------- #rice <- geodata::crop_calendar_rice()