can't load dartR anymore

50 views
Skip to first unread message

Gabriella Scatà

unread,
Dec 13, 2022, 8:14:13 PM12/13/22
to dartR
Hi everyone,
I suspect this is a general issue I am having with R andnot a dartR-specific problem, because I have the same issue with other programs, but I am hoping some of you have faced a similar issue lately and can give me some advice.

When I load the package, I receive the following error:

> library(dartR)
Loading required package: adegenet
Error: package or namespace load failed for ‘adegenet’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 namespace ‘vctrs’ 0.4.1 is already loaded, but >= 0.5.0 is required
Error: package ‘adegenet’ could not be loaded

Any idea?
I tried to unistall and reinstall rlang, but not success.

Thanks for any help.

Best,
Gabriella

Jose Luis Mijangos

unread,
Dec 13, 2022, 9:01:52 PM12/13/22
to dartR
Hi Gabriella,

Can you try updating all your packages by typing in the R console:

> update.packages(ask = FALSE)

Cheers,
Luis

Gabriella Scatà

unread,
Dec 13, 2022, 9:08:39 PM12/13/22
to da...@googlegroups.com
Hi Luis,
thank you for your reply,
that is actually something I wanted to avoid as when you updated all your packages to newer versions old codes may not work anymore and I normally prefer a targeted updating approach to single packages if i have to.
Would there be any other way around it?

I also had previous versions of dartR installed in separate libraries that I was switching to when needing previous functions...so I am a bit afraid this general updating approach will remove those too...

Let me know your thoughts.
If that's the only way sound it, I'll try updating all packages.

Thanks again!
Best,
Gabriella



--
You received this message because you are subscribed to a topic in the Google Groups "dartR" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dartr/xU9b7EPpUio/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dartr+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dartr/d663d3e6-d13b-42c1-a699-5b1fd7afdea4n%40googlegroups.com.

Bernd.Gruber

unread,
Dec 13, 2022, 10:01:37 PM12/13/22
to da...@googlegroups.com

Hi Gabriella,

 

You could try to only update the vctrs package. Easiest way would be

Restart R (and before doing anything)

install.packages(‘vctrs’)

library(dartR)

this might work, though you might have to redo this step, because there might be other dependencies that needs to be updated.

 

Cheers, Bernd

 

 

==============================================================================

Dr Bernd Gruber                                              )/_         

                                                         _.--..---"-,--c_    

Professor Ecological Modelling                      \|..'           ._O__)_     

Tel: (02) 6206 3804                         ,=.    _.+   _ \..--( /          

Fax: (02) 6201 2328                           \\.-''_.-' \ (     \_          

Institute for Applied Ecology                  `'''       `\__   /\          

Faculty of Science and Technology                          ')                

University of Canberra   ACT 2601 AUSTRALIA

Email: bernd....@canberra.edu.au

WWW: bernd-gruber

 

Australian Government Higher Education Provider Number CRICOS #00212K 

NOTICE & DISCLAIMER: This email and any files transmitted with it may contain
confidential or copyright material and are for the attention of the addressee
only. If you have received this email in error please notify us by email
reply and delete it from your system. The University of Canberra accepts
no liability for any damage caused by any virus transmitted by this email.

==============================================================================

--
You received this message because you are subscribed to the Google Groups "dartR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dartr+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dartr/CADvP4LShcMZMLBt8ZbmZgfW7it%3D-3qcUxGnoCH6UrJ8TcJ1paA%40mail.gmail.com.

Gabriella Scatà

unread,
Dec 14, 2022, 4:29:50 AM12/14/22
to dartR
Hi Bernd,
I tried to update vctrs package as well.

But , of course I ran into another issues with the package "cli" which seems to be a dependency of "vctrs".

So I got the following error and warning messages:

> versions::install.versions("vctrs", version="0.5.1", lib = "C:/Users/gabry/AppData/Local/R/win-library/4.2")

also installing the dependency ‘cli’
trying URL 'https://MRAN.revolutionanalytics.com/snapshot/2022-11-30/bin/windows/contrib/4.2/cli_3.4.1.zip'
Content type 'application/zip' length 1257774 bytes (1.2 MB)
downloaded 1.2 MB
trying URL 'https://MRAN.revolutionanalytics.com/snapshot/2022-11-30/bin/windows/contrib/4.2/vctrs_0.5.1.zip'
Content type 'application/zip' length 1361042 bytes (1.3 MB)
downloaded 1.3 MB

package ‘cli’ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package ‘cli’
Warning: restored ‘cli’

package ‘vctrs’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in

              C:\Users\gabry\AppData\Local\Temp\RtmpoBjp5m\downloaded_packages

Warning message:
In file.copy(savedcopy, lib, recursive = TRUE) :
problem copying C:\Users\scatag\AppData\Local\R\win-library\4.2\00LOCK\cli\libs\x64\cli.dll to C:\Users\scatag\AppData\Local\R\win-library\4.2\cli\libs\x64\cli.dll: Permission denied

>

I then tried to manually remove the "cli" package folder in the R win4.2 library folder and tried re-installing vctrs in the same way and it worked.
But then when i tried loading both vtcrs and gpplot 2, I get the following warning:
"Warning message:
package ‘ggplot2’ was built under R version 4.2.2"

But ggplot2 seems to work now.
And, I seem to be able to load dartR normally....but...
when i try the function "gl.diagnostics.hwe", i get the following error:

<
gl.diagnostics.hwe(
        gl.dataset1,
        alpha_val = 0.05,
        bins = 20,
        stdErr = TRUE,
        save2tmp = FALSE,
        n.cores = "auto",
        verbose = NULL
      )

Starting gl.diagnostics.hwe
  Processing genlight object with SNP data
Registered S3 methods overwritten by 'ggtern':
  method           from  
  grid.draw.ggplot ggplot2
  plot.ggplot      ggplot2
  print.ggplot     ggplot2
Error in base::nchar(wide_chars$test, type = "width") :
  lazy-load database 'C:/Users/scatag/AppData/Local/R/win-library/4.2/cli/R/sysdata.rdb' is corrupt
>

Is there something I can do about this??
I am afraid I might have similar problems with other functions...later on :/
Please let me know.
Thank you a lot!!
Best,
Gabriella


Reply all
Reply to author
Forward
0 new messages