I have been using this code multiple times, it worked two weeks ago as usual, but now, when I run the first line, R does not change the dataset I don't know why. As soon as I remove the pipe operator the dataset changes but I can't filter by region.
Covid19 <- read.csv("COVID19Cases_geoRegion.csv") %>%
filter(geoRegion == "CH")
Cases <- xts(Covid19[,3], order.by = as.Date(Covid19[,2]))
I also tried as follows but sill the same problem.
Covid19 <- read.csv("https://www.covid19.admin.ch/api/data/20220216-i4f5f0q1/sources/COVID19Hosp_geoRegion.csv") %>%
filter(geoRegion == "CH")
Hospital <- xts(Covid19[,3], order.by = as.Date(Covid19[,2]))
I try to install again the package dplyr
and also I tried with magrittr
but it is not working, does anyone know how to solve this problem?