I have a script in R, task.R, that reads in a .csv file, does bunch of calculations and writes a new .csv file with the final data. I'm having trouble with special characters (Icelandic), e.g. æ, á, ú etc.
As an example, when I source task.R, Ára becomes ára. If I use source("task.R", encoding = "UTF-8")
everything is fine.
I want to use the taskscheduleR package in R which basically source the task.R script. But because of the encoding problem, I have to create new script e.g. source_task.R with only one line of code: source("task.R", encoding = "UTF-8")
.
Is there any way to use the taskscheduleR package and somehow use encoding = "UTF-8" without having to create new script like source_task.R?