Last active
July 18, 2023 13:56
-
-
Save jrosell/c5a10814f42b472b07809c5054306063 to your computer and use it in GitHub Desktop.
Instalación del paquete {pak} y de paquetes de tidyverse en R.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install.packages("pak") | |
stopifnot( | |
'{pak} no está instalado. Por favor, ejecuta install.packages("pak") en la consola y vuelve a intentarlo.' = | |
sum("pak" == row.names(installed.packages())) == 1 | |
) | |
instalar <- setdiff( | |
c("ggplot2", "dplyr", "tidyr", "readr", "purrr", "tibble", "stringr", "forcats", "lubridate", "magrittr", "tidyverse"), | |
rownames(installed.packages()) | |
) | |
print(length(instalar)) | |
if(length(instalar) > 0){ | |
pak::pkg_install(instalar) | |
} | |
library(tidyverse) | |
tidyverse_packages() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment