Warning messages:
1: In min(x) : no non-missing arguments to min; returning Inf
2: In max(x) : no non-missing arguments to max; returning -Inf
3: In min(diff(sort(x))) : no non-missing arguments to min; returning Inf
4: Removed 7687 rows containing non-finite values (`stat_count()`).
我正试图按月制作一张打断的流感血清型号的纸张,我无法接过这一错误信息,因为我对我所缺的内容感到不安。
library(tidyverse)
library(dplyr)
library(lubridate)
library(ggplot2)
library(ggthemes)
Sys.setenv(TZ="America/New_York")
today <- Sys.Date()
flu2018_file <- "2018_flu.txt"
df_flu2018 <- as.data.frame(read.table(flu2018_file, sep=" ", header=TRUE, check.names=FALSE, fill=TRUE))
df_flu2018$month <- floor_date(as_date(mdy(df_flu2018$date)), unit="month")
plot_1 <- ggplot(df_flu2018) +
geom_histogram(stat="count", aes(x = month, fill = serotype))
plot_1