Add cover crop periods to a rotation calendar
expand_cover_crop.RdAdds cover crop sowing/destruction windows to a monthly calendar
produced by expand_rotation_calendar(), matched to the main crop by
crop.id.be.socmo/saison.culturale.
Usage
expand_cover_crop(
rotation_calendar,
df,
cover_id_var = "covercrop.id.be.socmo",
cover_start_var = "covercrop.sowing.date",
cover_stop_var = "covercrop.destruction.date"
)Arguments
- rotation_calendar
Monthly calendar as returned by
expand_rotation_calendar().- df
Rotation data frame (same one passed to
expand_rotation_calendar()), with the columns referenced bycover_id_var/cover_start_var/cover_stop_var, pluscrop.id.be.socmoandsaison.culturale.- cover_id_var
Name of the column in
dfholding the cover crop ID.- cover_start_var
Name of the column in
dfholding the cover crop sowing date (format"MM-DD", only the month is used).- cover_stop_var
Name of the column in
dfholding the cover crop destruction date (format"MM-DD", only the month is used).
Value
rotation_calendar with added columns cover.id.be.socmo,
cover.active, covercrop.sowing, covercrop.harvest, and
grp.cover.active. Same row count as the input.