It says that the error is in the "library(ggplot2)" line and I don't know how to fix it. Here's the code I was using:
library(ggplot2)
library('remotes')
remotes::install_github("GuangchuangYu/nCov2019", dependencies = TRUE)
library('nCov2019')
get_nCov2019(lang = 'en')
library(dplyr)
library(magrittr)
d <- y['global']
f <- d %>% dplyr::filter(time == time(y)) %>% top_n(180, cum_confirm) %>% arrange(desc(cum_confirm))
library(ggrepel)
library(dplyr)
require(ggplot2)
require(ggrepel)
ggplot(filter(d, d$time > '2020-02-05' & country %in% f$country), mapping = aes(time, cum_confirm , color = country, label = country)) +
geom_line() +
geom_text(data = f, aes(label = country, colour = country, x = time, y = cum_confirm))+
theme_minimal(base_size = 14)+
theme(legend.position = "none") +
ggtitle('Covid-19 Cases by Country', 'The progression of confirmed cases by countries')+
ylab('Confirmed Cases')
The graph seems about right when I run the chunk, but I also get the following message and I don't know what does that mean: "Removed 1 rows containing missing values (geom_text)."