I cant use any library in R.

When i call any library i got this error:

Error: package or namespace load failed for ‘tidyr’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
namespace ‘vctrs’ 0.6.2 is already loaded, but >= 0.6.3 is required

Hi @Shelsea
You need to update the vctrs package to the latest version and then load the tidyr package with library(tidyr).

Restart R & RStudio
then

install.packages(vctrs)

which will update vctrs as @ DavoWW suggests.

i did it, but the error is still there

the error is still there

Can you please share the complete console output you get when you run this command?

install.packages("vctrs")

Otherwise we don't have enough information to help you out.

´´

install.packages("vctrs")
Error in install.packages : Updating loaded packages

``

and when i call the library tidyr

´´

library(tidyr)
Error: package or namespace load failed for ‘tidyr’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
namespace ‘vctrs’ 0.6.2 is already loaded, but >= 0.6.3 is required

´´

This doesn't seem like the complete console output, are you sure you are not omitting something?

It could be that you are trying to update vctrs while it is currently loaded.

Can you give us the output from

installed.packages()[names(sessionInfo()$otherPkgs), "Version"]

If the issue is that the package is loaded, try using pak, it will take care of the loaded packages:

install.packages("pak", repos = sprintf(
  "https://r-lib.github.io/p/pak/stable/%s/%s/%s",
  .Platform$pkgType,
  R.Version()$os,
  R.Version()$arch
))

and then

pak::pkg_install("vctrs")

Another thing to check is whether you are automatically loading a .RData file at startup and this code is loading packages. There is an RStudio menu option to turn off the loading (and saving) of .RData files between R sessions.

Ah , good point.

Error in reprex_render():
! This reprex appears to crash R. Call reprex() again with std_out_err = TRUE to get more info.
Run rlang::last_trace() to see where the error occurred.

reprex(std_out_err = TRUE)

I can't figure out this error.

@natasham It seems like your message is not related to this topic. It seems like a good idea to start a new topic and this case, with appropriate tags. E.g. if you specifically have issues with the reprex package, include it in the title of the topic, and also in a tag, if possible.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.