R-code for the re-occuring report with name "Aktuellt R-tal" found here: https://www.folkhalsomyndigheten.se/smittskydd-beredskap/utbrott/aktuella-utbrott/covid-19/statistik-och-analyser/analys-och-prognoser/ (4 april 2021)
The report is continuously updated but here we upload a fixed data set (data until 2021-04-07). Hence, this is an example on how the estimated reproduction number is obtained. Note also, the data shared here could deviate from the one presented at The public health agency of sweden's dashboard on reported cases (https://www.folkhalsomyndigheten.se/smittskydd-beredskap/utbrott/aktuella-utbrott/covid-19/statistik-och-analyser/bekraftade-fall-i-sverige/)
In the script you need to specify the directory to where you save folder under project.path