predict_firstEgg
1 2 3 | predict_firstEgg(dat, v, refyear = year(Sys.Date()))
predict_firstEgg_data(F, refdate = Sys.Date())
|
1 2 3 4 5 6 7 8 9 10 | date_ = Sys.Date()
F = phenology('LIN')
predFirstEggData = predict_firstEgg_data(F, date_ )
predFirstEgg = predict_firstEgg(predFirstEggData, yday(date_), year(date_) )[, date_ := as.POSIXct(date_) ]
ggplot(predFirstEggData, aes(y = first_Egg , x = first_Lining, x) ) +
geom_point() +
geom_smooth(method = 'lm') + geom_text(aes(label = year_), vjust= 'bottom') +
geom_pointrange(data = predFirstEgg, aes(x = date_, y = fit, ymin = lwr, ymax = upr ), col = 2) +
ggtitle(paste(predFirstEgg[, difftime(fit, date_, units = 'days')%>% round], 'days till first egg.'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.