Skip to content

Commit 9792010

Browse files
committed
Avoid/Silence immaterial warnings/messages in vignettes
1 parent 7966553 commit 9792010

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

vignettes/archive.Rmd

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ library(epidatr)
3030
library(epiprocess)
3131
library(data.table)
3232
library(dplyr)
33+
library(purrr)
34+
library(ggplot2)
3335
3436
dv <- covidcast(
3537
data_source = "doctor-visits",
@@ -48,6 +50,8 @@ library(epidatr)
4850
library(epiprocess)
4951
library(data.table)
5052
library(dplyr)
53+
library(purrr)
54+
library(ggplot2)
5155
```
5256

5357
## Getting data into `epi_archive` format
@@ -189,8 +193,6 @@ marked by dotted vertical lines, and draw the latest curve in black (from the
189193
latest snapshot `x_latest` that the archive can provide).
190194

191195
```{r, fig.width = 8, fig.height = 7}
192-
library(purrr)
193-
library(ggplot2)
194196
theme_set(theme_bw())
195197
196198
self_max = max(x$DT$version)
@@ -203,15 +205,15 @@ snapshots <- map_dfr(versions, function(v) {
203205
204206
ggplot(snapshots %>% filter(!latest),
205207
aes(x = time_value, y = percent_cli)) +
206-
geom_line(aes(color = factor(version))) +
208+
geom_line(aes(color = factor(version)), na.rm=TRUE) +
207209
geom_vline(aes(color = factor(version), xintercept = version), lty = 2) +
208210
facet_wrap(~ geo_value, scales = "free_y", ncol = 1) +
209211
scale_x_date(minor_breaks = "month", date_labels = "%b %y") +
210212
labs(x = "Date", y = "% of doctor's visits with CLI") +
211213
theme(legend.position = "none") +
212214
geom_line(data = snapshots %>% filter(latest),
213215
aes(x = time_value, y = percent_cli),
214-
inherit.aes = FALSE, color = "black")
216+
inherit.aes = FALSE, color = "black", na.rm=TRUE)
215217
```
216218

217219
We can see some interesting and highly nontrivial revision behavior: at some

vignettes/compactify.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ For this example, we have one chart using LOCF values, while another doesn't
2828
use them to illustrate LOCF. Notice how the head of the first dataset differs
2929
from the second from the third value included.
3030

31-
```{r}
31+
```{r, message=FALSE}
3232
library(epiprocess)
3333
library(dplyr)
3434

0 commit comments

Comments
 (0)