On 21/09/2022 11:46, Bert Gunter wrote:
?options
options(encoding = "utf-8")
in a startup file or function should presumably do it. See ?Startup
Bert
Thanks everyone. Setting encoding in options in Rprofile.site has taken
care of it.
Curiously, it doesn't seem to solve the whole problem for Rscript
though. I checked that Rscript is indeed picking up the default encoding
from options, but it's complaining about seeing an unexpected input in
dat$lĂnea <- ....
immediately following the l when I run
Rscript myfile.R.
So, it would appear that Rscript is not using source to read in the R
script. Mind you, if I do
Rscript -e source('myfile.R')
it works properly just like in Rgui.
Once again, Thanks heaps.
Cheers,
Andrew.
______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.