unable to install a package.

Hi,

I updated my Rstudio and I'm trying to install a package called"fiftystater" but I'm getting an error message. May any one assist?

library(remotes)
install.packages('fiftystater')
#> Installing package into 'C:/Users/mahah_og9drz8/OneDrive/Documents/R/win-library/4.1'
#> (as 'lib' is unspecified)
#> Warning: package 'fiftystater' is not available for this version of R
#> 
#> A version of this package for your version of R might be available elsewhere,
#> see the ideas at
#> https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages

Created on 2022-04-24 by the reprex package (v2.0.1)

What version of R are you running? Perhaps update to the latest version and try again? Otherwise, restart and try again if you have already updated it.

It seems that package is not in CRAN and only available on GitHub so you have to install it with this command

remotes::install_github("wmurphyrd/fiftystater")

A couple things you need to consider:

  • R has problems with cloud-synced folders (OneDrive in your case), I recommend you to set your package library in a non-synced folder.
    You can change the default library folder by setting your R_LIBS_SITE environmental variable in a .Reviron or .Rprofile file. For example:
# In a .Renviron file you can set it by adding a line like this one with the desired location 
R_LIBS_SITE="C:\\Program Files\\R\\R-4.1.2\\library"

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

  • Installation of R packages from Github requires compilation and since you are on a Windows system, you need to have RTools installed on it, you can download it from here

https://cran.r-project.org/bin/windows/Rtools/rtools40.html

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.