Cannot load in ggplot2 or seemingly anything - r

So I haven't used R since I finished my masters.
I deleted a bunch of files back then.
Anyway I tried to work on things again but ggplot2 was not loading. I've tried now deleting RStudio and reinstalling fully, deleting win-library completely. Nothing seems to work:
install.packages("ggplot2")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/Ahsan/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependencies ‘cli’, ‘colorspace’, ‘utf8’, ‘farver’, ‘labeling’, ‘lifecycle’, ‘munsell’, ‘R6’, ‘RColorBrewer’, ‘viridisLite’, ‘fansi’, ‘magrittr’, ‘pillar’, ‘pkgconfig’, ‘vctrs’, ‘digest’, ‘glue’, ‘gtable’, ‘isoband’, ‘rlang’, ‘scales’, ‘tibble’, ‘withr’
There are binary versions available but the source versions are later:
binary source needs_compilation
cli 2.0.2 3.4.1 TRUE
colorspace 1.4-1 2.0-3 TRUE
utf8 1.1.4 1.2.2 TRUE
farver 2.0.3 2.1.1 TRUE
labeling 0.3 0.4.2 FALSE
lifecycle 0.2.0 1.0.3 FALSE
R6 2.4.1 2.5.1 FALSE
RColorBrewer 1.1-2 1.1-3 FALSE
viridisLite 0.3.0 0.4.1 FALSE
fansi 0.4.1 1.0.3 TRUE
magrittr 1.5 2.0.3 TRUE
pillar 1.4.3 1.8.1 FALSE
vctrs 0.2.4 0.4.2 TRUE
digest 0.6.25 0.6.29 TRUE
glue 1.4.0 1.6.2 TRUE
gtable 0.3.0 0.3.1 FALSE
isoband 0.2.1 0.2.6 TRUE
rlang 0.4.5 1.0.6 TRUE
scales 1.1.0 1.2.1 FALSE
tibble 3.0.1 3.1.8 TRUE
withr 2.2.0 2.5.0 FALSE
ggplot2 3.3.0 3.3.6 FALSE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/cli_2.0.2.zip'
Content type 'application/zip' length 397120 bytes (387 KB)
downloaded 387 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/colorspace_1.4-1.zip'
Content type 'application/zip' length 2549008 bytes (2.4 MB)
downloaded 2.4 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/utf8_1.1.4.zip'
Content type 'application/zip' length 214574 bytes (209 KB)
downloaded 209 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/farver_2.0.3.zip'
Content type 'application/zip' length 1910691 bytes (1.8 MB)
downloaded 1.8 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/munsell_0.5.0.zip'
Content type 'application/zip' length 244203 bytes (238 KB)
downloaded 238 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/fansi_0.4.1.zip'
Content type 'application/zip' length 222782 bytes (217 KB)
downloaded 217 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/magrittr_1.5.zip'
Content type 'application/zip' length 155738 bytes (152 KB)
downloaded 152 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/pkgconfig_2.0.3.zip'
Content type 'application/zip' length 22161 bytes (21 KB)
downloaded 21 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/vctrs_0.2.4.zip'
Content type 'application/zip' length 1018801 bytes (994 KB)
downloaded 994 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/digest_0.6.25.zip'
Content type 'application/zip' length 248623 bytes (242 KB)
downloaded 242 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/glue_1.4.0.zip'
Content type 'application/zip' length 157284 bytes (153 KB)
downloaded 153 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/isoband_0.2.1.zip'
Content type 'application/zip' length 3303519 bytes (3.2 MB)
downloaded 3.2 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/rlang_0.4.5.zip'
Content type 'application/zip' length 1115838 bytes (1.1 MB)
downloaded 1.1 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/tibble_3.0.1.zip'
Content type 'application/zip' length 407904 bytes (398 KB)
downloaded 398 KB
package ‘cli’ successfully unpacked and MD5 sums checked
package ‘colorspace’ successfully unpacked and MD5 sums checked
package ‘utf8’ successfully unpacked and MD5 sums checked
package ‘farver’ successfully unpacked and MD5 sums checked
package ‘munsell’ successfully unpacked and MD5 sums checked
package ‘fansi’ successfully unpacked and MD5 sums checked
package ‘magrittr’ successfully unpacked and MD5 sums checked
package ‘pkgconfig’ successfully unpacked and MD5 sums checked
package ‘vctrs’ successfully unpacked and MD5 sums checked
package ‘digest’ successfully unpacked and MD5 sums checked
package ‘glue’ successfully unpacked and MD5 sums checked
package ‘isoband’ successfully unpacked and MD5 sums checked
package ‘rlang’ successfully unpacked and MD5 sums checked
package ‘tibble’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Ahsan\AppData\Local\Temp\RtmpURKnmJ\downloaded_packages
installing the source packages ‘labeling’, ‘lifecycle’, ‘R6’, ‘RColorBrewer’, ‘viridisLite’, ‘pillar’, ‘gtable’, ‘scales’, ‘withr’, ‘ggplot2’
trying URL 'https://cran.rstudio.com/src/contrib/labeling_0.4.2.tar.gz'
Content type 'application/x-gzip' length 10156 bytes
downloaded 10156 bytes
trying URL 'https://cran.rstudio.com/src/contrib/lifecycle_1.0.3.tar.gz'
Content type 'application/x-gzip' length 106854 bytes (104 KB)
downloaded 104 KB
trying URL 'https://cran.rstudio.com/src/contrib/R6_2.5.1.tar.gz'
Content type 'application/x-gzip' length 63422 bytes (61 KB)
downloaded 61 KB
trying URL 'https://cran.rstudio.com/src/contrib/RColorBrewer_1.1-3.tar.gz'
Content type 'application/x-gzip' length 11638 bytes (11 KB)
downloaded 11 KB
trying URL 'https://cran.rstudio.com/src/contrib/viridisLite_0.4.1.tar.gz'
Content type 'application/x-gzip' length 1267090 bytes (1.2 MB)
downloaded 1.2 MB
trying URL 'https://cran.rstudio.com/src/contrib/pillar_1.8.1.tar.gz'
Content type 'application/x-gzip' length 479977 bytes (468 KB)
downloaded 468 KB
trying URL 'https://cran.rstudio.com/src/contrib/gtable_0.3.1.tar.gz'
Content type 'application/x-gzip' length 92733 bytes (90 KB)
downloaded 90 KB
trying URL 'https://cran.rstudio.com/src/contrib/scales_1.2.1.tar.gz'
Content type 'application/x-gzip' length 270609 bytes (264 KB)
downloaded 264 KB
trying URL 'https://cran.rstudio.com/src/contrib/withr_2.5.0.tar.gz'
Content type 'application/x-gzip' length 102089 bytes (99 KB)
downloaded 99 KB
trying URL 'https://cran.rstudio.com/src/contrib/ggplot2_3.3.6.tar.gz'
Content type 'application/x-gzip' length 3061989 bytes (2.9 MB)
downloaded 2.9 MB
installing source package 'labeling' ...
** package 'labeling' successfully unpacked and MD5 sums checked
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'labeling'
finding HTML links ... done
extended html
extended.figures html
gnuplot html
heckbert html
labeling-internal html
labeling-package html
matplotlib html
nelder html
rpretty html
sparks html
thayer html
wilkinson html
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
DONE (labeling)
In R CMD INSTALL
installing source package 'lifecycle' ...
** package 'lifecycle' successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'rlang' 0.4.5 is being loaded, but >= 1.0.6 is required
ERROR: lazy loading failed for package 'lifecycle'
removing 'C:/Users/Ahsan/Documents/R/win-library/3.5/lifecycle'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘lifecycle’ had non-zero exit status
installing source package 'R6' ...
** package 'R6' successfully unpacked and MD5 sums checked
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'R6'
finding HTML links ... done
R6Class html
as.list.R6 html
is.R6 html
*** copying figures
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
DONE (R6)
In R CMD INSTALL
installing source package 'RColorBrewer' ...
** package 'RColorBrewer' successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'RColorBrewer'
finding HTML links ... done
ColorBrewer html
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
DONE (RColorBrewer)
In R CMD INSTALL
installing source package 'viridisLite' ...
** package 'viridisLite' successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'viridisLite'
finding HTML links ... done
viridis html
viridis.map html
*** copying figures
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
DONE (viridisLite)
In R CMD INSTALL
installing source package 'gtable' ...
** package 'gtable' successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'gtable'
finding HTML links ... done
bind html
gtable-package html
gtable html
gtable_add_cols html
gtable_add_grob html
gtable_add_padding html
gtable_add_rows html
gtable_add_space html
gtable_col html
gtable_filter html
Rd warning: C:/Users/Ahsan/AppData/Local/Temp/RtmpSqbjMI/R.INSTALL7ee849be739a/gtable/man/gtable_filter.Rd:12: file link 'regular expression' in package 'base' does not exist and so has been treated as a topic
Rd warning: C:/Users/Ahsan/AppData/Local/Temp/RtmpSqbjMI/R.INSTALL7ee849be739a/gtable/man/gtable_filter.Rd:15: file link 'as.character' in package 'base' does not exist and so has been treated as a topic
gtable_height html
gtable_matrix html
gtable_row html
gtable_show_layout html
gtable_spacer html
gtable_trim html
gtable_width html
is.gtable html
print.gtable html
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
DONE (gtable)
In R CMD INSTALL
installing source package 'withr' ...
** package 'withr' successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'withr'
finding HTML links ... done
defer html
devices html
Rd warning: C:/Users/Ahsan/AppData/Local/Temp/Rtmpi2NkSE/R.INSTALL75e85eba3949/withr/man/devices.Rd:228: file link 'X11' in package 'grDevices' does not exist and so has been treated as a topic
makevars_user html
set_makevars html
with_ html
with_collate html
with_connection html
with_db_connection html
with_dir html
with_envvar html
with_file html
with_gctorture2 html
with_language html
with_libpaths html
with_locale html
with_makevars html
with_options html
with_package html
Rd warning: C:/Users/Ahsan/AppData/Local/Temp/Rtmpi2NkSE/R.INSTALL75e85eba3949/withr/man/with_package.Rd:68: file link '.libPaths' in package 'base' does not exist and so has been treated as a topic
with_par html
with_path html
with_rng_version html
with_seed html
with_sink html
with_temp_libpaths html
with_tempfile html
with_timezone html
withr html
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
DONE (withr)
In R CMD INSTALL
ERROR: dependency 'lifecycle' is not available for package 'pillar'
removing 'C:/Users/Ahsan/Documents/R/win-library/3.5/pillar'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘pillar’ had non-zero exit status
ERROR: dependency 'lifecycle' is not available for package 'scales'
removing 'C:/Users/Ahsan/Documents/R/win-library/3.5/scales'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘scales’ had non-zero exit status
ERROR: dependency 'scales' is not available for package 'ggplot2'
removing 'C:/Users/Ahsan/Documents/R/win-library/3.5/ggplot2'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\Ahsan\AppData\Local\Temp\RtmpURKnmJ\downloaded_packages’

Related

tidyverse in R: Cannot load tidyverse package [duplicate]

I am trying to install the tidyverse package and not being able to do it.
1-tried via Packages -> Install
2-tried from console-> install.packages("tidyverse")
Gives errors as below and therefore not loading the lirary
> library(tidyverse)
Error in library(tidyverse) : there is no package called ‘tidyverse’
Console Errors:
****************************************************************************************
> install.packages("tidyverse")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/arikl/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependencies ‘lifecycle’, ‘tidyselect’, ‘vctrs’, ‘gargle’, ‘glue’, ‘rematch2’, ‘scales’, ‘ellipsis’, ‘vroom’, ‘tzdb’, ‘broom’, ‘cli’, ‘dbplyr’, ‘dplyr’, ‘dtplyr’, ‘googledrive’, ‘googlesheets4’, ‘ggplot2’, ‘haven’, ‘hms’, ‘jsonlite’, ‘lubridate’, ‘magrittr’, ‘modelr’, ‘pillar’, ‘readr’, ‘rlang’, ‘rvest’, ‘tibble’, ‘tidyr’
There are binary versions available but the source versions
are later:
binary source needs_compilation
lifecycle 0.2.0 1.0.1 FALSE
tidyselect 1.0.0 1.1.1 TRUE
vctrs 0.2.4 0.3.8 TRUE
gargle 0.4.0 1.2.0 FALSE
glue 1.4.0 1.4.2 TRUE
rematch2 2.1.0 2.1.2 FALSE
scales 1.1.0 1.1.1 FALSE
ellipsis 0.3.0 0.3.2 TRUE
vroom 1.2.0 1.5.5 TRUE
broom 0.5.6 0.7.9 FALSE
cli 2.0.2 3.0.1 TRUE
dbplyr 1.4.3 2.1.1 FALSE
dplyr 0.8.5 1.0.7 TRUE
dtplyr 1.0.1 1.1.0 FALSE
googledrive 1.0.0 2.0.0 FALSE
googlesheets4 0.1.1 1.0.0 FALSE
ggplot2 3.3.0 3.3.5 FALSE
haven 2.2.0 2.4.3 TRUE
hms 0.5.3 1.1.1 FALSE
jsonlite 1.6.1 1.7.2 TRUE
lubridate 1.7.8 1.7.10 TRUE
magrittr 1.5 2.0.1 TRUE
modelr 0.1.6 0.1.8 FALSE
pillar 1.4.3 1.6.3 FALSE
readr 1.3.1 2.0.2 TRUE
rlang 0.4.5 0.4.11 TRUE
rvest 0.3.5 1.0.1 FALSE
tibble 3.0.1 3.1.4 TRUE
tidyr 1.0.2 1.1.4 TRUE
tidyverse 1.3.0 1.3.1 FALSE
Binaries will be installed
Package which is only available in source form, and may need
compilation of C/C++/Fortran: ‘tzdb’
These will not be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/tidyselect_1.0.0.zip'
Content type 'application/zip' length 242507 bytes (236 KB)
downloaded 236 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/vctrs_0.2.4.zip'
Content type 'application/zip' length 1018801 bytes (994 KB)
downloaded 994 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/glue_1.4.0.zip'
Content type 'application/zip' length 157284 bytes (153 KB)
downloaded 153 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/ellipsis_0.3.0.zip'
Content type 'application/zip' length 44220 bytes (43 KB)
downloaded 43 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/vroom_1.2.0.zip'
Content type 'application/zip' length 1665604 bytes (1.6 MB)
downloaded 1.6 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/cli_2.0.2.zip'
Content type 'application/zip' length 397120 bytes (387 KB)
downloaded 387 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/dplyr_0.8.5.zip'
Content type 'application/zip' length 3256479 bytes (3.1 MB)
downloaded 3.1 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/haven_2.2.0.zip'
Content type 'application/zip' length 1050152 bytes (1.0 MB)
downloaded 1.0 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/jsonlite_1.6.1.zip'
Content type 'application/zip' length 1164207 bytes (1.1 MB)
downloaded 1.1 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/lubridate_1.7.8.zip'
Content type 'application/zip' length 1583751 bytes (1.5 MB)
downloaded 1.5 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/magrittr_1.5.zip'
Content type 'application/zip' length 155738 bytes (152 KB)
downloaded 152 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/readr_1.3.1.zip'
Content type 'application/zip' length 1588558 bytes (1.5 MB)
downloaded 1.5 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/rlang_0.4.5.zip'
Content type 'application/zip' length 1115838 bytes (1.1 MB)
downloaded 1.1 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/tibble_3.0.1.zip'
Content type 'application/zip' length 407904 bytes (398 KB)
downloaded 398 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/tidyr_1.0.2.zip'
Content type 'application/zip' length 1297802 bytes (1.2 MB)
downloaded 1.2 MB
package ‘tidyselect’ successfully unpacked and MD5 sums checked
package ‘vctrs’ successfully unpacked and MD5 sums checked
package ‘glue’ successfully unpacked and MD5 sums checked
package ‘ellipsis’ successfully unpacked and MD5 sums checked
package ‘vroom’ successfully unpacked and MD5 sums checked
package ‘cli’ successfully unpacked and MD5 sums checked
package ‘dplyr’ successfully unpacked and MD5 sums checked
package ‘haven’ successfully unpacked and MD5 sums checked
package ‘jsonlite’ successfully unpacked and MD5 sums checked
package ‘lubridate’ successfully unpacked and MD5 sums checked
package ‘magrittr’ successfully unpacked and MD5 sums checked
package ‘readr’ successfully unpacked and MD5 sums checked
package ‘rlang’ successfully unpacked and MD5 sums checked
package ‘tibble’ successfully unpacked and MD5 sums checked
package ‘tidyr’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\arikl\AppData\Local\Temp\RtmpCoTyE0\downloaded_packages
installing the source packages ‘lifecycle’, ‘gargle’, ‘rematch2’, ‘scales’, ‘broom’, ‘dbplyr’, ‘dtplyr’, ‘googledrive’, ‘googlesheets4’, ‘ggplot2’, ‘hms’, ‘modelr’, ‘pillar’, ‘rvest’, ‘tidyverse’
trying URL 'https://cran.rstudio.com/src/contrib/lifecycle_1.0.1.tar.gz'
Content type 'application/x-gzip' length 99716 bytes (97 KB)
downloaded 97 KB
trying URL 'https://cran.rstudio.com/src/contrib/gargle_1.2.0.tar.gz'
Content type 'application/x-gzip' length 313418 bytes (306 KB)
downloaded 306 KB
trying URL 'https://cran.rstudio.com/src/contrib/rematch2_2.1.2.tar.gz'
Content type 'application/x-gzip' length 13366 bytes (13 KB)
downloaded 13 KB
trying URL 'https://cran.rstudio.com/src/contrib/scales_1.1.1.tar.gz'
Content type 'application/x-gzip' length 515201 bytes (503 KB)
downloaded 503 KB
trying URL 'https://cran.rstudio.com/src/contrib/broom_0.7.9.tar.gz'
Content type 'application/x-gzip' length 631606 bytes (616 KB)
downloaded 616 KB
trying URL 'https://cran.rstudio.com/src/contrib/dbplyr_2.1.1.tar.gz'
Content type 'application/x-gzip' length 581845 bytes (568 KB)
downloaded 568 KB
trying URL 'https://cran.rstudio.com/src/contrib/dtplyr_1.1.0.tar.gz'
Content type 'application/x-gzip' length 111895 bytes (109 KB)
downloaded 109 KB
trying URL 'https://cran.rstudio.com/src/contrib/googledrive_2.0.0.tar.gz'
Content type 'application/x-gzip' length 1593656 bytes (1.5 MB)
downloaded 1.5 MB
trying URL 'https://cran.rstudio.com/src/contrib/googlesheets4_1.0.0.tar.gz'
Content type 'application/x-gzip' length 222038 bytes (216 KB)
downloaded 216 KB
trying URL 'https://cran.rstudio.com/src/contrib/ggplot2_3.3.5.tar.gz'
Content type 'application/x-gzip' length 3063309 bytes (2.9 MB)
downloaded 2.9 MB
trying URL 'https://cran.rstudio.com/src/contrib/hms_1.1.1.tar.gz'
Content type 'application/x-gzip' length 43117 bytes (42 KB)
downloaded 42 KB
trying URL 'https://cran.rstudio.com/src/contrib/modelr_0.1.8.tar.gz'
Content type 'application/x-gzip' length 121333 bytes (118 KB)
downloaded 118 KB
trying URL 'https://cran.rstudio.com/src/contrib/pillar_1.6.3.tar.gz'
Content type 'application/x-gzip' length 1130236 bytes (1.1 MB)
downloaded 1.1 MB
trying URL 'https://cran.rstudio.com/src/contrib/rvest_1.0.1.tar.gz'
Content type 'application/x-gzip' length 94307 bytes (92 KB)
downloaded 92 KB
trying URL 'https://cran.rstudio.com/src/contrib/tidyverse_1.3.1.tar.gz'
Content type 'application/x-gzip' length 702779 bytes (686 KB)
downloaded 686 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 loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'rlang' 0.4.5 is being loaded, but >= 0.4.10 is required
ERROR: lazy loading failed for package 'lifecycle'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/lifecycle'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘lifecycle’ had non-zero exit status
* installing *source* package 'gargle' ...
** package 'gargle' successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'rlang' 0.4.5 is being loaded, but >= 0.4.9 is required
ERROR: lazy loading failed for package 'gargle'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/gargle'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘gargle’ had non-zero exit status
* installing *source* package 'rematch2' ...
** package 'rematch2' successfully unpacked and MD5 sums checked
** R
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called 'lifecycle'
ERROR: lazy loading failed for package 'rematch2'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/rematch2'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘rematch2’ had non-zero exit status
* installing *source* package 'broom' ...
** package 'broom' successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'dplyr' 0.8.5 is being loaded, but >= 1.0.0 is required
ERROR: lazy loading failed for package 'broom'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/broom'
* restoring previous 'C:/Users/arikl/Documents/R/win-library/3.5/broom'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘broom’ had non-zero exit status
ERROR: dependency 'lifecycle' is not available for package 'scales'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/scales'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘scales’ had non-zero exit status
ERROR: dependency 'lifecycle' is not available for package 'dbplyr'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/dbplyr'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘dbplyr’ had non-zero exit status
ERROR: dependency 'lifecycle' is not available for package 'dtplyr'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/dtplyr'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘dtplyr’ had non-zero exit status
ERROR: dependency 'lifecycle' is not available for package 'hms'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/hms'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘hms’ had non-zero exit status
* installing *source* package 'modelr' ...
** package 'modelr' successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called 'lifecycle'
ERROR: lazy loading failed for package 'modelr'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/modelr'
* restoring previous 'C:/Users/arikl/Documents/R/win-library/3.5/modelr'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘modelr’ had non-zero exit status
ERROR: dependency 'lifecycle' is not available for package 'pillar'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/pillar'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘pillar’ had non-zero exit status
ERROR: dependency 'lifecycle' is not available for package 'rvest'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/rvest'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘rvest’ had non-zero exit status
ERROR: dependencies 'gargle', 'lifecycle', 'pillar' are not available for package 'googledrive'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/googledrive'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘googledrive’ had non-zero exit status
ERROR: dependency 'scales' is not available for package 'ggplot2'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/ggplot2'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
ERROR: dependencies 'gargle', 'googledrive', 'rematch2' are not available for package 'googlesheets4'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/googlesheets4'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘googlesheets4’ had non-zero exit status
ERROR: dependencies 'dbplyr', 'dtplyr', 'googledrive', 'googlesheets4', 'ggplot2', 'hms', 'pillar', 'rvest' are not available for package 'tidyverse'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/tidyverse'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘tidyverse’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\arikl\AppData\Local\Temp\RtmpCoTyE0\downloaded_packages’
> library(tidyverse)
Error in library(tidyverse) : there is no package called ‘tidyverse’
You have a very old version of R. You should update to the current version if you want things to go smoothly.
If you can't do that, here's what you'll have to do:
Install the version of Rtools suitable for R 3.5.x.
Install the packages you want. Some of them won't work, because they will need later versions of R, but won't declare that. So when you find one that fails, try installing the previous version of that package. If that also fails, try an even earlier one. Etc. Your R version was current in 2018, so you may need to go that far back in time to find compatible packages.
Once you finally have everything working, try to update your packages. Maybe some of them could be more recent versions, maybe not. Do them one at a time. Typically tidyverse needs about 90 of them, so this will take a while.
So I recommend that you update your R version.
On my macOS12, it prompts me to install openssl and then install tinyverse again

ggplot not installing - tried everything

I'm out of options to install ggplot. I tried installing from Tools, from the console itself, indicating the cran source, indicating the local dir that the ggplot.gz file appears in. None of them works. I tried installing devtools first but same issue with that package too. I still get the error as follows:
install.packages("ggplot2")
Installing package into ‘\\corp.bloomberg.com/ny-dfs/Users/asadeghi8/R/win-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependencies ‘lifecycle’, ‘rlang’, ‘scales’, ‘withr’
There are binary versions available but the source versions are later:
binary source needs_compilation
lifecycle 0.2.0 1.0.1 FALSE
rlang 0.4.5 1.0.2 TRUE
scales 1.1.0 1.2.0 FALSE
withr 2.2.0 2.5.0 FALSE
ggplot2 3.3.0 3.3.6 FALSE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/rlang_0.4.5.zip'
Content type 'application/zip' length 1115838 bytes (1.1 MB)
downloaded 1.1 MB
package ‘rlang’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\asadeghi8\AppData\Local\Temp\RtmpY96UwM\downloaded_packages
installing the source packages ‘lifecycle’, ‘scales’, ‘withr’, ‘ggplot2’
trying URL 'https://cran.rstudio.com/src/contrib/lifecycle_1.0.1.tar.gz'
Content type 'application/x-gzip' length 99716 bytes (97 KB)
downloaded 97 KB
trying URL 'https://cran.rstudio.com/src/contrib/scales_1.2.0.tar.gz'
Content type 'application/x-gzip' length 270188 bytes (263 KB)
downloaded 263 KB
trying URL 'https://cran.rstudio.com/src/contrib/withr_2.5.0.tar.gz'
Content type 'application/x-gzip' length 102089 bytes (99 KB)
downloaded 99 KB
trying URL 'https://cran.rstudio.com/src/contrib/ggplot2_3.3.6.tar.gz'
Content type 'application/x-gzip' length 3061989 bytes (2.9 MB)
downloaded 2.9 MB
* installing *source* package 'lifecycle' ...
** package 'lifecycle' successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'rlang' 0.4.5 is being loaded, but >= 0.4.10 is required
ERROR: lazy loading failed for package 'lifecycle'
* removing '\\corp.bloomberg.com/ny-dfs/Users/asadeghi8/R/win-library/3.5/lifecycle'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘lifecycle’ had non-zero exit status
* installing *source* package 'withr' ...
** package 'withr' successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'withr'
finding HTML links ... done
defer html
devices html
Rd warning: C:/Users/asadeghi8/AppData/Local/Temp/RtmpIN8vq1/R.INSTALL987c3eca7587/withr/man/devices.Rd:228: file link 'X11' in package 'grDevices' does not exist and so has been treated as a topic
makevars_user html
set_makevars html
with_ html
with_collate html
with_connection html
with_db_connection html
with_dir html
with_envvar html
with_file html
with_gctorture2 html
with_language html
with_libpaths html
with_locale html
with_makevars html
with_options html
with_package html
Rd warning: C:/Users/asadeghi8/AppData/Local/Temp/RtmpIN8vq1/R.INSTALL987c3eca7587/withr/man/with_package.Rd:68: file link '.libPaths' in package 'base' does not exist and so has been treated as a topic
with_par html
with_path html
with_rng_version html
with_seed html
with_sink html
with_temp_libpaths html
with_tempfile html
with_timezone html
withr html
*** copying figures
** building package indices
** installing vignettes
Warning in file(con, "w") :
cannot open file '\\corp.bloomberg.com/ny-dfs/Users/asadeghi8/R/win-library/3.5/withr/doc/index.html': No such file or directory
Error in file(con, "w") : cannot open the connection
ERROR: installing vignettes failed
* removing '\\corp.bloomberg.com/ny-dfs/Users/asadeghi8/R/win-library/3.5/withr'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘withr’ had non-zero exit status
ERROR: dependency 'lifecycle' is not available for package 'scales'
* removing '\\corp.bloomberg.com/ny-dfs/Users/asadeghi8/R/win-library/3.5/scales'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘scales’ had non-zero exit status
ERROR: dependencies 'scales', 'withr' are not available for package 'ggplot2'
* removing '\\corp.bloomberg.com/ny-dfs/Users/asadeghi8/R/win-library/3.5/ggplot2'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\asadeghi8\AppData\Local\Temp\RtmpY96UwM\downloaded_packages’
> library("ggplot")
Error in library("ggplot") : there is no package called ‘ggplot’
I tried to update the rlang package but it when I install it again, it's the same version. This is how it's installed:
> install.packages("rlang")
Installing package into ‘\\corp.bloomberg.com/ny-dfs/Users/asadeghi8/R/win-library/3.5’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
rlang 0.4.5 1.0.2 TRUE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/rlang_0.4.5.zip'
Content type 'application/zip' length 1115838 bytes (1.1 MB)
downloaded 1.1 MB
package ‘rlang’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\asadeghi8\AppData\Local\Temp\RtmpwpTtFm\downloaded_packages

Can't install tidyverse package in R version 3.5.2

I am trying to install the tidyverse package and not being able to do it.
1-tried via Packages -> Install
2-tried from console-> install.packages("tidyverse")
Gives errors as below and therefore not loading the lirary
> library(tidyverse)
Error in library(tidyverse) : there is no package called ‘tidyverse’
Console Errors:
****************************************************************************************
> install.packages("tidyverse")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/arikl/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependencies ‘lifecycle’, ‘tidyselect’, ‘vctrs’, ‘gargle’, ‘glue’, ‘rematch2’, ‘scales’, ‘ellipsis’, ‘vroom’, ‘tzdb’, ‘broom’, ‘cli’, ‘dbplyr’, ‘dplyr’, ‘dtplyr’, ‘googledrive’, ‘googlesheets4’, ‘ggplot2’, ‘haven’, ‘hms’, ‘jsonlite’, ‘lubridate’, ‘magrittr’, ‘modelr’, ‘pillar’, ‘readr’, ‘rlang’, ‘rvest’, ‘tibble’, ‘tidyr’
There are binary versions available but the source versions
are later:
binary source needs_compilation
lifecycle 0.2.0 1.0.1 FALSE
tidyselect 1.0.0 1.1.1 TRUE
vctrs 0.2.4 0.3.8 TRUE
gargle 0.4.0 1.2.0 FALSE
glue 1.4.0 1.4.2 TRUE
rematch2 2.1.0 2.1.2 FALSE
scales 1.1.0 1.1.1 FALSE
ellipsis 0.3.0 0.3.2 TRUE
vroom 1.2.0 1.5.5 TRUE
broom 0.5.6 0.7.9 FALSE
cli 2.0.2 3.0.1 TRUE
dbplyr 1.4.3 2.1.1 FALSE
dplyr 0.8.5 1.0.7 TRUE
dtplyr 1.0.1 1.1.0 FALSE
googledrive 1.0.0 2.0.0 FALSE
googlesheets4 0.1.1 1.0.0 FALSE
ggplot2 3.3.0 3.3.5 FALSE
haven 2.2.0 2.4.3 TRUE
hms 0.5.3 1.1.1 FALSE
jsonlite 1.6.1 1.7.2 TRUE
lubridate 1.7.8 1.7.10 TRUE
magrittr 1.5 2.0.1 TRUE
modelr 0.1.6 0.1.8 FALSE
pillar 1.4.3 1.6.3 FALSE
readr 1.3.1 2.0.2 TRUE
rlang 0.4.5 0.4.11 TRUE
rvest 0.3.5 1.0.1 FALSE
tibble 3.0.1 3.1.4 TRUE
tidyr 1.0.2 1.1.4 TRUE
tidyverse 1.3.0 1.3.1 FALSE
Binaries will be installed
Package which is only available in source form, and may need
compilation of C/C++/Fortran: ‘tzdb’
These will not be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/tidyselect_1.0.0.zip'
Content type 'application/zip' length 242507 bytes (236 KB)
downloaded 236 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/vctrs_0.2.4.zip'
Content type 'application/zip' length 1018801 bytes (994 KB)
downloaded 994 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/glue_1.4.0.zip'
Content type 'application/zip' length 157284 bytes (153 KB)
downloaded 153 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/ellipsis_0.3.0.zip'
Content type 'application/zip' length 44220 bytes (43 KB)
downloaded 43 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/vroom_1.2.0.zip'
Content type 'application/zip' length 1665604 bytes (1.6 MB)
downloaded 1.6 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/cli_2.0.2.zip'
Content type 'application/zip' length 397120 bytes (387 KB)
downloaded 387 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/dplyr_0.8.5.zip'
Content type 'application/zip' length 3256479 bytes (3.1 MB)
downloaded 3.1 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/haven_2.2.0.zip'
Content type 'application/zip' length 1050152 bytes (1.0 MB)
downloaded 1.0 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/jsonlite_1.6.1.zip'
Content type 'application/zip' length 1164207 bytes (1.1 MB)
downloaded 1.1 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/lubridate_1.7.8.zip'
Content type 'application/zip' length 1583751 bytes (1.5 MB)
downloaded 1.5 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/magrittr_1.5.zip'
Content type 'application/zip' length 155738 bytes (152 KB)
downloaded 152 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/readr_1.3.1.zip'
Content type 'application/zip' length 1588558 bytes (1.5 MB)
downloaded 1.5 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/rlang_0.4.5.zip'
Content type 'application/zip' length 1115838 bytes (1.1 MB)
downloaded 1.1 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/tibble_3.0.1.zip'
Content type 'application/zip' length 407904 bytes (398 KB)
downloaded 398 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/tidyr_1.0.2.zip'
Content type 'application/zip' length 1297802 bytes (1.2 MB)
downloaded 1.2 MB
package ‘tidyselect’ successfully unpacked and MD5 sums checked
package ‘vctrs’ successfully unpacked and MD5 sums checked
package ‘glue’ successfully unpacked and MD5 sums checked
package ‘ellipsis’ successfully unpacked and MD5 sums checked
package ‘vroom’ successfully unpacked and MD5 sums checked
package ‘cli’ successfully unpacked and MD5 sums checked
package ‘dplyr’ successfully unpacked and MD5 sums checked
package ‘haven’ successfully unpacked and MD5 sums checked
package ‘jsonlite’ successfully unpacked and MD5 sums checked
package ‘lubridate’ successfully unpacked and MD5 sums checked
package ‘magrittr’ successfully unpacked and MD5 sums checked
package ‘readr’ successfully unpacked and MD5 sums checked
package ‘rlang’ successfully unpacked and MD5 sums checked
package ‘tibble’ successfully unpacked and MD5 sums checked
package ‘tidyr’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\arikl\AppData\Local\Temp\RtmpCoTyE0\downloaded_packages
installing the source packages ‘lifecycle’, ‘gargle’, ‘rematch2’, ‘scales’, ‘broom’, ‘dbplyr’, ‘dtplyr’, ‘googledrive’, ‘googlesheets4’, ‘ggplot2’, ‘hms’, ‘modelr’, ‘pillar’, ‘rvest’, ‘tidyverse’
trying URL 'https://cran.rstudio.com/src/contrib/lifecycle_1.0.1.tar.gz'
Content type 'application/x-gzip' length 99716 bytes (97 KB)
downloaded 97 KB
trying URL 'https://cran.rstudio.com/src/contrib/gargle_1.2.0.tar.gz'
Content type 'application/x-gzip' length 313418 bytes (306 KB)
downloaded 306 KB
trying URL 'https://cran.rstudio.com/src/contrib/rematch2_2.1.2.tar.gz'
Content type 'application/x-gzip' length 13366 bytes (13 KB)
downloaded 13 KB
trying URL 'https://cran.rstudio.com/src/contrib/scales_1.1.1.tar.gz'
Content type 'application/x-gzip' length 515201 bytes (503 KB)
downloaded 503 KB
trying URL 'https://cran.rstudio.com/src/contrib/broom_0.7.9.tar.gz'
Content type 'application/x-gzip' length 631606 bytes (616 KB)
downloaded 616 KB
trying URL 'https://cran.rstudio.com/src/contrib/dbplyr_2.1.1.tar.gz'
Content type 'application/x-gzip' length 581845 bytes (568 KB)
downloaded 568 KB
trying URL 'https://cran.rstudio.com/src/contrib/dtplyr_1.1.0.tar.gz'
Content type 'application/x-gzip' length 111895 bytes (109 KB)
downloaded 109 KB
trying URL 'https://cran.rstudio.com/src/contrib/googledrive_2.0.0.tar.gz'
Content type 'application/x-gzip' length 1593656 bytes (1.5 MB)
downloaded 1.5 MB
trying URL 'https://cran.rstudio.com/src/contrib/googlesheets4_1.0.0.tar.gz'
Content type 'application/x-gzip' length 222038 bytes (216 KB)
downloaded 216 KB
trying URL 'https://cran.rstudio.com/src/contrib/ggplot2_3.3.5.tar.gz'
Content type 'application/x-gzip' length 3063309 bytes (2.9 MB)
downloaded 2.9 MB
trying URL 'https://cran.rstudio.com/src/contrib/hms_1.1.1.tar.gz'
Content type 'application/x-gzip' length 43117 bytes (42 KB)
downloaded 42 KB
trying URL 'https://cran.rstudio.com/src/contrib/modelr_0.1.8.tar.gz'
Content type 'application/x-gzip' length 121333 bytes (118 KB)
downloaded 118 KB
trying URL 'https://cran.rstudio.com/src/contrib/pillar_1.6.3.tar.gz'
Content type 'application/x-gzip' length 1130236 bytes (1.1 MB)
downloaded 1.1 MB
trying URL 'https://cran.rstudio.com/src/contrib/rvest_1.0.1.tar.gz'
Content type 'application/x-gzip' length 94307 bytes (92 KB)
downloaded 92 KB
trying URL 'https://cran.rstudio.com/src/contrib/tidyverse_1.3.1.tar.gz'
Content type 'application/x-gzip' length 702779 bytes (686 KB)
downloaded 686 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 loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'rlang' 0.4.5 is being loaded, but >= 0.4.10 is required
ERROR: lazy loading failed for package 'lifecycle'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/lifecycle'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘lifecycle’ had non-zero exit status
* installing *source* package 'gargle' ...
** package 'gargle' successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'rlang' 0.4.5 is being loaded, but >= 0.4.9 is required
ERROR: lazy loading failed for package 'gargle'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/gargle'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘gargle’ had non-zero exit status
* installing *source* package 'rematch2' ...
** package 'rematch2' successfully unpacked and MD5 sums checked
** R
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called 'lifecycle'
ERROR: lazy loading failed for package 'rematch2'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/rematch2'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘rematch2’ had non-zero exit status
* installing *source* package 'broom' ...
** package 'broom' successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'dplyr' 0.8.5 is being loaded, but >= 1.0.0 is required
ERROR: lazy loading failed for package 'broom'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/broom'
* restoring previous 'C:/Users/arikl/Documents/R/win-library/3.5/broom'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘broom’ had non-zero exit status
ERROR: dependency 'lifecycle' is not available for package 'scales'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/scales'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘scales’ had non-zero exit status
ERROR: dependency 'lifecycle' is not available for package 'dbplyr'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/dbplyr'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘dbplyr’ had non-zero exit status
ERROR: dependency 'lifecycle' is not available for package 'dtplyr'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/dtplyr'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘dtplyr’ had non-zero exit status
ERROR: dependency 'lifecycle' is not available for package 'hms'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/hms'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘hms’ had non-zero exit status
* installing *source* package 'modelr' ...
** package 'modelr' successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called 'lifecycle'
ERROR: lazy loading failed for package 'modelr'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/modelr'
* restoring previous 'C:/Users/arikl/Documents/R/win-library/3.5/modelr'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘modelr’ had non-zero exit status
ERROR: dependency 'lifecycle' is not available for package 'pillar'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/pillar'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘pillar’ had non-zero exit status
ERROR: dependency 'lifecycle' is not available for package 'rvest'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/rvest'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘rvest’ had non-zero exit status
ERROR: dependencies 'gargle', 'lifecycle', 'pillar' are not available for package 'googledrive'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/googledrive'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘googledrive’ had non-zero exit status
ERROR: dependency 'scales' is not available for package 'ggplot2'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/ggplot2'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
ERROR: dependencies 'gargle', 'googledrive', 'rematch2' are not available for package 'googlesheets4'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/googlesheets4'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘googlesheets4’ had non-zero exit status
ERROR: dependencies 'dbplyr', 'dtplyr', 'googledrive', 'googlesheets4', 'ggplot2', 'hms', 'pillar', 'rvest' are not available for package 'tidyverse'
* removing 'C:/Users/arikl/Documents/R/win-library/3.5/tidyverse'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘tidyverse’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\arikl\AppData\Local\Temp\RtmpCoTyE0\downloaded_packages’
> library(tidyverse)
Error in library(tidyverse) : there is no package called ‘tidyverse’
You have a very old version of R. You should update to the current version if you want things to go smoothly.
If you can't do that, here's what you'll have to do:
Install the version of Rtools suitable for R 3.5.x.
Install the packages you want. Some of them won't work, because they will need later versions of R, but won't declare that. So when you find one that fails, try installing the previous version of that package. If that also fails, try an even earlier one. Etc. Your R version was current in 2018, so you may need to go that far back in time to find compatible packages.
Once you finally have everything working, try to update your packages. Maybe some of them could be more recent versions, maybe not. Do them one at a time. Typically tidyverse needs about 90 of them, so this will take a while.
So I recommend that you update your R version.
On my macOS12, it prompts me to install openssl and then install tinyverse again

RMD packages can't be downloaded in R Studio

I can't download the RMD packages in R studio. I tried it by running install.packages("rmarkdown"), and I tried it by File > New File > R Markdown > Download packages.
This is the output:
> install.packages("rmarkdown")
Installing package into ‘C:/Users/Luke/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
also installing the dependencies ‘glue’, ‘stringi’, ‘knitr’, ‘yaml’, ‘stringr’
There are binary versions available but the source versions are later:
binary source needs_compilation
glue 1.0.0 1.3.1 TRUE
stringi 1.1.5 1.4.3 TRUE
knitr 1.15.1 1.23 FALSE
yaml 2.1.14 2.2.0 TRUE
stringr 1.2.0 1.4.0 FALSE
rmarkdown 1.4 1.13 FALSE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/glue_1.0.0.zip'
Content type 'application/zip' length 34947 bytes (34 KB)
downloaded 34 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/stringi_1.1.5.zip'
Content type 'application/zip' length 14220135 bytes (13.6 MB)
downloaded 13.6 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.2/yaml_2.1.14.zip'
Content type 'application/zip' length 180051 bytes (175 KB)
downloaded 175 KB
package ‘glue’ successfully unpacked and MD5 sums checked
package ‘stringi’ successfully unpacked and MD5 sums checked
package ‘yaml’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Luke\AppData\Local\Temp\Rtmpq6rTgq\downloaded_packages
installing the source packages ‘knitr’, ‘stringr’, ‘rmarkdown’
trying URL 'https://cran.rstudio.com/src/contrib/knitr_1.23.tar.gz'
Content type 'application/x-gzip' length 880134 bytes (859 KB)
downloaded 859 KB
trying URL 'https://cran.rstudio.com/src/contrib/stringr_1.4.0.tar.gz'
Content type 'application/x-gzip' length 135777 bytes (132 KB)
downloaded 132 KB
trying URL 'https://cran.rstudio.com/src/contrib/rmarkdown_1.13.tar.gz'
Content type 'application/x-gzip' length 3155180 bytes (3.0 MB)
downloaded 3.0 MB
* installing *source* package 'stringr' ...
** package 'stringr' successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'stringi' 1.1.5 is being loaded, but >= 1.1.7 is required
ERROR: lazy loading failed for package 'stringr'
* removing 'C:/Users/Luke/Documents/R/win-library/3.2/stringr'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.3/bin/i386/R" CMD INSTALL -l "C:\Users\Luke\Documents\R\win-library\3.2" C:\Users\Luke\AppData\Local\Temp\Rtmpq6rTgq/downloaded_packages/stringr_1.4.0.tar.gz' had status 1
Warning in install.packages :
installation of package ‘stringr’ had non-zero exit status
ERROR: dependency 'stringr' is not available for package 'knitr'
* removing 'C:/Users/Luke/Documents/R/win-library/3.2/knitr'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.3/bin/i386/R" CMD INSTALL -l "C:\Users\Luke\Documents\R\win-library\3.2" C:\Users\Luke\AppData\Local\Temp\Rtmpq6rTgq/downloaded_packages/knitr_1.23.tar.gz' had status 1
Warning in install.packages :
installation of package ‘knitr’ had non-zero exit status
ERROR: dependencies 'knitr', 'stringr' are not available for package 'rmarkdown'
* removing 'C:/Users/Luke/Documents/R/win-library/3.2/rmarkdown'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.3/bin/i386/R" CMD INSTALL -l "C:\Users\Luke\Documents\R\win-library\3.2" C:\Users\Luke\AppData\Local\Temp\Rtmpq6rTgq/downloaded_packages/rmarkdown_1.13.tar.gz' had status 1
Warning in install.packages :
installation of package ‘rmarkdown’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\Luke\AppData\Local\Temp\Rtmpq6rTgq\downloaded_packages’
The C:\Users\Luke\AppData\Local\Temp\Rtmpq6rTgq\downloaded_packages folder contains:
Screenshot of named folder
I am very inexperienced with programming in R, so I have no idea what to do with this. I am learning to do it (via the online Udacity course), and for that I need these RMD packages to continue. I hope someone can help me.

Why R packages are removed after updating them?

I was trying to update some R packages since RStudio showed they could be updated. After updating, two packages are simply removed. (rgdal and spatstat). The same thing has happened several times recently. What is happening here?
> install.packages(c("data.table", "rgdal", "spatstat"))
Installing packages into ‘C:/Users/Patrick/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependency ‘spatstat.data’
There is a binary version available but the source version is later:
binary source needs_compilation
spatstat.data 1.1-0 1.1-1 FALSE
trying URL 'https://mirror.las.iastate.edu/CRAN/bin/windows/contrib/3.4/data.table_1.10.4-1.zip'
Content type 'application/zip' length 1577319 bytes (1.5 MB)
downloaded 1.5 MB
trying URL 'https://mirror.las.iastate.edu/CRAN/bin/windows/contrib/3.4/rgdal_1.2-13.zip'
Content type 'application/zip' length 30475771 bytes (29.1 MB)
downloaded 29.1 MB
trying URL 'https://mirror.las.iastate.edu/CRAN/bin/windows/contrib/3.4/spatstat_1.53-2.zip'
Content type 'application/zip' length 14521163 bytes (13.8 MB)
downloaded 13.8 MB
package ‘data.table’ successfully unpacked and MD5 sums checked
package ‘rgdal’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘rgdal’
package ‘spatstat’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘spatstat’
The downloaded binary packages are in
C:\Users\Patrick\AppData\Local\Temp\RtmpeaKi0Y\downloaded_packages
installing the source package ‘spatstat.data’
trying URL 'https://mirror.las.iastate.edu/CRAN/src/contrib/spatstat.data_1.1-1.tar.gz'
Content type 'application/x-gzip' length 2837063 bytes (2.7 MB)
downloaded 2.7 MB
* installing *source* package 'spatstat.data' ...
** package 'spatstat.data' successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (spatstat.data)
The downloaded source packages are in
‘C:\Users\Patrick\AppData\Local\Temp\RtmpeaKi0Y\downloaded_packages’
> library(rgdal)
Error in library(rgdal) : there is no package called ‘rgdal’
> library(spatstat)
Error in library(spatstat) : there is no package called ‘spatstat’
You can find the directory that contains your installed packages with
.libPaths()
Which should give you something like:
"/Library/Frameworks/R.framework/Versions/3.3/Resources/library"
If you see rgdal or spatstat there I would delete them and then try installing again.

Resources