After installing R to a non-standard location with a non-ASCII name, one cannot create a project

Problem:

After installing R to a non-standard location with a non-ASCII name, such as a folder with Chinese or Japanese characters, you cannot create a project and it displays the following error message:

Error: Error: package or namespace load failed for 'janitor':
.onLoad failed in loadNamespace() for 'rlang', details:
call: check_linked_version(pkg, with_rlang = FALSE)
error: unable to translate 'D:/<U+7A0B><U+5E8F><U+5B89><U+88C5>/R-4.2.1/library/utils/R/utils.rdb' to native encoding

Solution:

  1. Uninstall R from the non-standard location.
  2. Reinstall R to the default location.
  3. Restart Exploratory Desktop.
1 Like