My Rprofile has encoding issues
I have created a function that I use all the time:
str_delatinize <- function (x) chartr("ÁÉÍÓÚÑáéíóúñ", "AEIOUNaeioun", x)
The issue with this function is the latin characters that are not encoded correctly when sourced via different channels. From what I read this issue is more present in Windows than other systems, but I can't verify it.
When sourced incorrectly this function shows the following error:
Error in chartr("Ã\201ÉÃ\215ÓÚÑáéÃóúñ", "AEIOUNaeioun", x) :
'old' is longer than 'new'
All the latin characters are encoded weirdly, and actually this is the reason to delatinize them.
When sourcing this directly, I can pass an encoding parameter like so:
source("file_with_function.R", encoding="utf-8")
Is there a way to pass encoding parameter when calling startup::startup()?
Thank you.
I've added argument encoding to startup(), e.g.
startup::startup(encoding = "utf-8")
Could you please try with the version in the develop branch, i.e.
remotes::install_github("HenrikBengtsson/startup", ref = "develop")