I have downloaded the latest update and receive this message as a pop-up window
I am using RStudio as a teaching tool in Scotland for Higher Applications of Maths, so my coding knowledge is super minimal
Can anyone help, Error message below
Error in .rs.nullCoalesce(pref, "UTF-8") :
could not find function "...length"
Hi, welcome to the forum.
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
```
```
Hi,
Thanks for helping.
Its every time I type something into the command window, so every few keystrokes
The initial code is, where I was setting the session working directory
setwd("C:/Users/my name/OneDrive - Glow Scotland/Lessons/2024-2025/Higher Apps/Data sets")
I did this via the drop down menus rather than typing it out
The result of SessionInfo() is below
R version 3.3.0 (2016-05-03)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)
locale:
[1] LC_COLLATE=English_United Kingdom.1252
[2] LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_3.3.0
I'm not sure if this helps you
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.
I am pretty sure that
setwd("C:/Users/my name/OneDrive - Glow Scotland/Lessons/2024-2025/Higher Apps/Data sets")
is not the correc way to access OneDRive but I have never used so cannot make any useful suggestions.