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