Description Usage Format Details Examples
Body weight of cows througout a lactation for 48 cows.
1 |
Identifier of cow
Time from calving in days
Body weight
There are 48 cowids in cowbw
; cowbw2
contains data for the first six cowids.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | require(ggplot2)
data(cowbw2)
qplot(tfc, bw, data=cowbw2, colour=cowid) + geom_path()
cowlst <- cowbw2 %>% split(.$cowid)
i <- 2
dd <- cowlst[[i]]
tvar <- dd$tfc
yvar <- dd$bw
f1 <- ses(yvar, tvar)
f2 <- des(yvar, tvar)
plot(f1)
at <- seq(10, 310, by=20)
forecast_lines(f1, at=at, ahead=0:20, col='red', lwd=3)
forecast_lines(f2, at=at, ahead=0:20, col='blue', lwd=3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.