# Select the appropiate columns from Tudela_DW example dataset, create
# a vector or harvest dates and estimate the number favorable and
# unfavorable days on each year in the dataset.
library(magrittr)
library(dplyr)
Weather <- Tudela_DW %>%
select(Year, Month, Day, Tmax, Tmin) %>%
filter (Tudela_DW$Year<=2002)
harvest <- c(225, 250, 275)
Color_assess <- color_potential(Weather, harvest)
Run the code above in your browser using DataLab