When saving a file, use File → Save with encoding and select, for example. UTF-8. If the next time the file is not read correctly, use File -> Reopen with encoding.
You can also change RStudio settings (Tools → Global Options / General → Text Encoding by default) and set "UTF-8".
source
share