Tidyverse installation error: modelr



Hello RStudio Community!

My first post and happy to b a part of the group as I delve into R.

I encountered the following output as I tried to install the tidyverse dependency "modelr". Please assist:

Installing package into ‘C:/Users/Kevin Gore/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
Warning in install.packages :
  lzma decoding result 10

  There is a binary version available but the source version is later:
       binary source needs_compilation
modelr  0.1.2  0.1.3             FALSE

installing the source package ‘modelr’

trying URL 'https://cran.rstudio.com/src/contrib/modelr_0.1.3.tar.gz'
Content type 'application/x-gzip' length 119309 bytes (116 KB)
downloaded 116 KB

Warning: invalid package 'C:\Users\Kevin'
Warning: invalid package 'Gore\AppData\Local\Temp\RtmpAxvGhz/downloaded_packages/modelr_0.1.3.tar.gz'
Error: ERROR: no packages specified
Warning in install.packages :
  installation of package ‘modelr’ had non-zero exit status

The downloaded source packages are in
	‘C:\Users\Kevin Gore\AppData\Local\Temp\RtmpAxvGhz\downloaded_packages’


Here is the tidyverse installation error, btw:

library("tidyverse", lib.loc="~/R/win-library/3.5")
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘modelr’


Apparently install.packages() is having problems with the empty space in your library path, try installing to this path instead.

install.packages("modelr", lib = "C:/Program Files/R/R-3.5.2/library") # Change R version as needed

#> I inserted the code without spacing as suggested, but received this error message:
> install.packages("modelr", lib = "C:/Program Files/R/R-3.5.2/library")
Warning in install.packages :
  'lib = "C:/Program Files/R/R-3.5.2/library"' is not writable
Error in install.packages : unable to install packages


Are you running rstudio as administrator? You need administrative permissions to write in the Program Files folder