Skip to content

Instantly share code, notes, and snippets.

@jrosell
Last active July 18, 2023 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrosell/c5a10814f42b472b07809c5054306063 to your computer and use it in GitHub Desktop.
Save jrosell/c5a10814f42b472b07809c5054306063 to your computer and use it in GitHub Desktop.
Instalación del paquete {pak} y de paquetes de tidyverse en R.
# 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