I am sorry, but I cannot find the reason why my code does not work.
I want to download a csv file from here: https://www.ecdc.europa.eu/en/publications-data/download-todays-data-geographic-distribution-covid-19-cases-worldwide and it even tells me how to do it:
#these libraries need to be loaded
library(utils)
#read the Dataset sheet into “R”. The dataset will be called "data".
data <- read.csv("https://opendata.ecdc.europa.eu/covid19/casedistribution/csv", na.strings = "", fileEncoding = "UTF-8-BOM")
I always recive the error message:
Error in file(file, "rt", encoding = fileEncoding) : cannot open connection
I tried to google this, but could not find anything that would help me. The file exists (I think) and if I download it first manually and then put it into R it works fine. But I can't find the reason it does not work like it is shown.
Thank you for your help!