UPDATE: The commenter below was of great help and described the solution accurately.
I'm a masters student trying to import data stored in .dta files in a folder on my desktop.
In my R Studio environment, I click a button "import dataset" (which I have used successfully in the past numerous times) and it gives me an error: "there is no package called hms".
Error message here: https://i.sstatic.net/CFcGZ.png
I went into the "packages" viewer and hit "install" to install the package hms without changing defaults. You can see the window here: https://i.sstatic.net/IqTp4.png
UPDATE: After manually installing the packages lifecycle, hms, and rlang, this is now what my screen looks like when attempting to import a dataset from stata. My going hypothesis is now that my current error has nothing to do with packages I'm trying to install. I think I've cleared that hurdle: https://i.sstatic.net/PCJLZ.png
The below markup is the exact output I get when installing hms.
Installing package into ‘C:/Users/nfeld/OneDrive/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependency ‘lifecycle’
There are binary versions available but the source versions are later:
binary source needs_compilation
lifecycle 0.2.0 1.0.0 FALSE
hms 0.5.3 1.0.0 FALSE
installing the source packages ‘lifecycle’, ‘hms’
trying URL 'https://cran.rstudio.com/src/contrib/lifecycle_1.0.0.tar.gz'
Content type 'application/x-gzip' length 83389 bytes (81 KB)
downloaded 81 KB
trying URL 'https://cran.rstudio.com/src/contrib/hms_1.0.0.tar.gz'
Content type 'application/x-gzip' length 42765 bytes (41 KB)
downloaded 41 KB
* installing *source* package 'lifecycle' ...
** package 'lifecycle' successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
Error in rbind(info, getNamespaceInfo(env, "S3methods")) :
number of columns of matrices must match (see arg 2)
ERROR: lazy loading failed for package 'lifecycle'
* removing 'C:/Users/nfeld/OneDrive/Documents/R/win-library/3.5/lifecycle'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘lifecycle’ had non-zero exit status
ERROR: dependency 'lifecycle' is not available for package 'hms'
* removing 'C:/Users/nfeld/OneDrive/Documents/R/win-library/3.5/hms'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘hms’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\nfeld\AppData\Local\Temp\RtmpcPhJj5\downloaded_packages’
The solution to the problem was to reinstall R/Rstudio and all required packages. I believe this was caused by a known issue with incompatible package versions (https://github.com/tidyverse/tidyverse/issues/179) and potentially had to do with installing R packages into a OneDrive folder.