update all packages in R

gene_x 0 like s 292 view s

Tags: packages

# Load the utils package
library(utils)

# Get information about all installed packages
pkg_info <- packageStatus()

# Filter the information to show only packages that need to be updated
outdated_packages <- pkg_info[,"needsUpdate"]

# Display the number of outdated packages
cat("Number of outdated packages:", length(outdated_packages))

pkg_info <- packageStatus()
pkg_info

Number of installed packages:

                            ok upgrade unavailable

/usr/local/lib/R/site-library 467 27 161 /usr/lib/R/site-library 0 0 0 /usr/lib/R/library 16 13 0

Number of available packages (each package counted only once):

                                           installed not installed

http://ftp.gwdg.de/pub/misc/cran/src/contrib 506 18771

/usr/local/lib/R/site-library /usr/lib/R/library/

sudo chown -R jhuang:jhuang /usr/lib/R/library/ 
sudo chown -R jhuang:jhuang /usr/share/R/doc/html
#update.packages(ask = FALSE)
update.packages(repos='http://cran.rstudio.com/', ask=FALSE, checkBuilt=TRUE)

like unlike

点赞本文的读者

还没有人对此文章表态


本文有评论

没有评论

看文章,发评论,不要沉默


© 2023 XGenes.com Impressum