On Mon, 10 Oct 2022 15:32:33 +0200
<sibylle.stoec...@gmx.ch> wrote:

> Error in nchar(homeDir) : invalid multibyte string, element 1

I searched for nchar(homeDir) in the R source code and on CRAN (as
indexed by GitHub), and the only CRAN match was probably unrelated (in
the ibmdbR package).

There's also a few matches in the RStudio source code:
https://github.com/rstudio/rstudio/blob/3742521ab2e67528090358a42d9f13933f4400df/src/cpp/session/modules/SessionPackages.R

A search of "nchar(homeDir)" on RStudio website gives a lot of
seemingly relevant results.

However, I don't see them doing anything obviously wrong. This could be
related to stricter handling of invalid strings that was recently
improved in R:
https://blog.r-project.org/2022/10/10/improvements-in-handling-bytes-encoding/

What does path.expand("~/") return on your machine? What is Encoding(.)
of the value? What are its actual byte values, i.e. charToRaw(.)? What
is your sessionInfo()?

-- 
Best regards,
Ivan

______________________________________________
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.

Reply via email to