How to update all of your R packages
There are times when working in R that you'll want to update not just one package, but all packages you currently have installed. There are many ways to do this, but I recently saw a tip from Kurt Birson that was so good, I had to make a video to demonstrate it. In the latest R in 2 Minutes video, I show you how to update all of your R packages with just a few lines of code.
Here's the code I used in the video:
library(tidyverse)
my_packages <-
installed.packages() |>
as_tibble() |>
pull(Package)
install.packages(my_packages)
Sign up for the newsletter
Get blog posts like this delivered straight to your inbox.
You need to be signed-in to comment on this post. Login.