Ouch, that error looks a bit obscure though it seems you are running into a data encoding problem. Would you paste the output of
sessionInfo()
between
```
```
here.
We probably need to see the code you are using and a but of sample data. You should include all of your code as an error may only be obvious much later in the code execution.
Copy the code and paste it here between
```
```
A handy way to supply data is to use the dput() function. Do dput(mydata) where "mydata" is the name of your dataset. For really large datasets probably dput(head(mydata, 100)) will do. Paste the output between
```
Thanks for the details.
I am not sure how to interpret your locale information but I don't like the look of it. The LC_COLLATE=English_United Kingdom.1252 and LC_CTYPE=English_United Kingdom.1252 say that you are not using UTF-8 encoding which looks like the source of the problem.
Here is mine from a clean start.
sessionInfo()
R version 4.4.2 (2024-10-31)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 24.04.1 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.12.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.12.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
time zone: America/Toronto
tzcode source: system (glibc)
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.4.2 tools_4.4.2 rstudioapi_0.17.1
You are running R version 3.3.0 (2016-05-03) which is well over 8.5 years and very, very out of date. You cannot run a lot of modern R packages on it.
I'd suggest upgrading to the most recent version of R which I believe is R version 4.4.2 and seeing what happens.