Readr package error

11 views
Skip to first unread message

Patrick Belton

unread,
Jun 13, 2023, 5:41:47 PM6/13/23
to obiba-users
I am using R version 4.0.2. I am getting the following error when I try and execute in my R terminal a read dependent function:

> opal.assign(o, symbol="D", value="TRACK_TBI.xxxx", variables=list("Subjxxx","Wardxxx"))

Error: [Server error: (500) Internal Server Error] RockServerException, Error while evaluating 'base::source('.variable-cols.R')' -> Error : package ‘readr’ was installed before R 4.0.0: please re-install it

I have tried uninstalling and re-installing the readr package several times, tried updating the entire package set for R, tried re-starting the R server from Opal. I get the same error. The read package otherwise works fine:

> x<-read.csv("readr_test_csv.csv")

Warning message:

In read.table(file = file, header = header, sep = sep, quote = quote,  :

  incomplete final line found by readTableHeader on 'readr_test_csv.csv'

> colnames(x)

[1] "Field.1" "Field.2" "Field.3"

In terms of the readr package installation, here it is:

> pkgs <- opal.execute(o, "installed.packages()")

> pkgs['readr',]

                                                                                                                    Package 

                                                                                                                    "readr" 

                                                                                                                    LibPath 

                                                                                                     "/usr/lib64/R/library" 

                                                                                                                    Version 

                                                                                                                    "2.1.4" 

                                                                                                                   Priority 

                                                                                                                         NA 

                                                                                                                    Depends 

                                                                                                               "R (>= 3.5)" 

                                                                                                                    Imports 

"cli (>= 3.2.0), clipr, crayon, hms (>= 0.4.1), lifecycle (>=\n0.2.0), methods, R6, rlang, tibble, utils, vroom (>= 1.6.0)" 

                                                                                                                  LinkingTo 

                                                                                                   "cpp11, tzdb (>= 0.1.1)" 

                                                                                                                   Suggests 

     "covr, curl, datasets, knitr, rmarkdown, spelling, stringi,\ntestthat (>= 3.1.2), tzdb (>= 0.1.1), waldo, withr, xml2" 

                                                                                                                   Enhances 

                                                                                                                         NA 

                                                                                                                    License 

                                                                                                       "MIT + file LICENSE" 

                                                                                                            License_is_FOSS 

                                                                                                                         NA 

                                                                                                      License_restricts_use 

                                                                                                                         NA 

                                                                                                                    OS_type 

                                                                                                                         NA 

                                                                                                                     MD5sum 

                                                                                                                         NA 

                                                                                                           NeedsCompilation 

                                                                                                                      "yes" 

                                                                                                                      Built 

                                                                                                                    "3.6.0" 

R version check: 

> rockr.eval(conn, quote(R.version))

               _                           

platform       x86_64-koji-linux-gnu       

arch           x86_64                      

os             linux-gnu                   

system         x86_64, linux-gnu           

status                                     

major          4                           

minor          0.2                         

year           2020                        

month          06                          

day            22                          

svn rev        78730                       

language       R                           

version.string R version 4.0.2 (2020-06-22)

nickname       Taking Off Again            

This seems to limit our ability to call Opal objects/data for R analysis. Any ideas on why this might happen?

Yannick Marcon

unread,
Jun 14, 2023, 1:54:12 AM6/14/23
to obiba...@googlegroups.com
The readr package is installed at /usr/lib64/R/library which location is not writable by the R server; how did you (re)install the readr package? You should do it through the R server using the opalr's oadmin.install_package function:

oadmin.install_package(o, "readr")

Regards
Yannick


--
You received this message because you are subscribed to the Google Groups "obiba-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to obiba-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/obiba-users/d97721d9-3d52-4cae-8774-56ca9c1a81dbn%40googlegroups.com.

Patrick Belton

unread,
Jun 14, 2023, 2:36:27 PM6/14/23
to obiba...@googlegroups.com
Thanks for the help, Yannick. This ended up being a conflict between multiple R libraries; the uninstalls/installs/updates were all going to one folder but the old version package was in another. After I erased the (non-recommended, non-essential) packages in the second R package library and then re-installed the tidyverse, it worked.

Yannick Marcon

unread,
Jun 15, 2023, 1:51:58 AM6/15/23
to obiba...@googlegroups.com
Yes, that is one of the reason why we provide ready to use docker images of the R server: it is always a pain to upgrade R core because all the other packages needs to be recompiled...

Yannick 

Reply all
Reply to author
Forward
0 new messages