dplyr, nycflights13, Hmisc packages are not loading


The above packages are not loading. I get a similar message with all of them:

Error: package or namespace load failed for ‘nycflights13’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
object 'pkgInfo' not found
In addition: Warning message:
In loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
package ‘pkgconfig’ has no 'package.rds' in Meta/

Please help!


Hi David:

Try installing the package pkgconfig.


When you make a question, I recommend using reprex to make it easier to resolve it.


Is your package library in a cloud-synced folder? If you don't know for sure, can you post the output of running this command .libPaths()?

1 Like

I dont think it is. Here is what happened when I put .libpaths:

Error in .libpaths() : could not find function ".libpaths"

Im in a windows environment, by the way

I get this response with pkgconfig:

*Error in library(pkgconfig) : *

  • ‘pkgconfig’ is not a valid installed package*

im using R version 4.0.5 (latest one)

R is case sensitive the function is .libPaths() not .libpaths()

Gracias Andres

Tenias razon. Esto aparece:

[1] "C:/Users/david.esparza/OneDrive - PasTest/Documents/R/win-library/4.0"
[2] "C:/Program Files/R/R-4.0.5/library"


Sorry, I think that maybe Andrés is near to the solution. I know that have the package library in a cloud folder can cause problems but I don't exactly know how to solve this issue or what It's the easiest solution.

Good luck! :four_leaf_clover:

R has problems with cloud synced folders, try changing your default package library to a non synced folder, You can change the default library folder by setting your R_LIBS_SITE environmental variable on a .Reviron or .Rprofile file

# In a .Renviron file you can set it by adding this line
R_LIBS_SITE="C:\\Program Files\\R\\R-4.0.5\\library"

For a more detailed explanation, you can read this blog post

1 Like

hi Andres,

I see what you mean. I have uninstalled the R version from the hard drive, but I still have a part of R in the cloud. I have deleted everything except the pkconfig folder, which has "Meta" folder. I haven't been able to delete it, it has this sign of two arrows looking at each other, as in a cycle.

I understand now why there were two lines when running .libPaths. One corresponded to the cloud and the other to the cloud install. I have managed to delete everything in the cloud R folder except for that pkconfig folder. I know that if I install R again in the hard drive I will have the same problem.
thank you

Sorry but I don't understand what you mean, it seems to me you are misunderstanding my advice. It wasn't necessary to uninstall R, just to change the location of the default package library (which is a folder)

R by default defines two package library locations, one at the user level in the user's home folder (which in your case is synced with OneDrive) and the other at the system level in the "Programs Files" folder.


I know you didn't suggest to uninstall, it takes 3 minutes anyway, I just thought it might work.

how do I find the .reviron file? i have been looking for it and I can't find it.

thank you very much!

It doesn't exist by default, you have to create one and save it into your home or project folder depending on the scope you want it to have.

For more information about R startup files, you can read the following support article.

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.