Description Usage Arguments Value See Also Examples
Dit maakt een extra element in een grafiek.
1 2 |
plot |
Een |
type |
Type element dat toegevoegd moet worden. Voor een lijst van mogelijkheden: |
move |
Standaard is |
size |
Standaard is |
linetype |
Standaard is |
colour |
Standaard is |
... |
Parameters die doorgegeven worden aan het type, zoals |
Een ggplot
-model.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # Variabelen uit plot$data worden vertaald, zoals hier uit `rr_ewma`:
plot2(y = (runif(52) * 100) + 300, type = "line") %>%
plot2.add("line", y = rr_ewma(y, lambda = 0.75))
# hier met gefingeerde weekaantallen
tibble(week = 1:52,
meetpuntjes = (runif(52) * 100) + 30) %>%
plot2(type = "point",
size = 2,
colour = "gray") %>%
plot2.add("line",
colour = "gray",
size = 0.5) %>%
# rrEWMA
plot2.add("line",
y = rr_ewma(meetpuntjes,
lambda = 0.9)) %>%
# 90e percentiel
plot2.add("line",
y = quantile(meetpuntjes,
0.9,
info = FALSE),
linetype = 2,
colour = "certeblauw") %>%
# en een leesbaardere x-as: elke 4 weken en beginnen bij 1
plot2.axis("x",
breaks = c(1, seq(from = 0, to = 52, by = 4)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.