I'm rather new to R and I could use your assistance.
I am currently trying to import a csv file from an URL. I have found many examples. Unfortunately, none of them work for my problem.
Specifically, I wanted to import the file from this url: https://www.bfs.admin.ch/bfsstatic/dam/assets/15324797/master
I tried these few lines of code:
temp <- tempfile()
download.file("https://www.bfs.admin.ch/bfsstatic/dam/assets/15324797/master",temp, mode = "w")
data<- read_csv2("je-b-03.03.02.05.csv")
and also this:
data <- read_csv2(url("https://www.bfs.admin.ch/bfsstatic/dam/assets/15324797/master"))
But that didn't work either. On the other hand, when I paste the url into my browser, the file is downloaded automatically.
I would appreciate any help. Thanks