I recently installed the newest version of RStudio.
In the new version it is not possible to run rmarkdown or quarto scripts with scandinavian letters like æ,ø and å. I have tried to use File > Reopen with encoding and also change the encoding in the RProject that contains the files.
Example:
d1 <- d %>%
- group_by(ansattnr, avdeling) %>%
- summarise(år_2019 = sum(år_2019, na.rm=TRUE),
-
år_2020 = sum(år_2020, na.rm=TRUE),
-
år_2021 = sum(år_2021, na.rm=TRUE)) %>%
- mutate(avdeling_kort = case_when(str_sub(avdeling,1,3) == "Akv" ~ "Akvakultur",
-
str_sub(avdeling,1,3) == "Mar" ~ "Marine",
-
str_sub(avdeling,1,3) == "Sjø" ~ "Sjømat")) %>%
Error: unexpected symbol in:
" str_sub(avdeling,1,3) == "Mar" ~ "Marine",
str_sub(avdeling,1,3) == "Sj�" ~ "Sj�mat""
Version information:
RStudio 2022.02.2+485 "Prairie Trillium" Release (8acbd38b0d4ca3c86c570cf4112a8180c48cc6fb, 2022-04-19) for Windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.8 Chrome/69.0.3497.128 Safari/537.36