Wednesday, December 12

How to upgrade R version without losing your existing installed packages


R is a language & environment for statistical computing and graphics. R was created by Ross Ihaka and Robert Gentleman at the University of Auckland, New Zealand. Currently it is a GNU project which is similar to the S language and environment which was developed at Bell Laboratories.

Here are the steps I performed to reuse the downloaded libraries (saves the paint o reinstall each library) when I upgraded R from 3.5.0 to 3.5.1.

Before any update of R, start the software or Rstudio to know where all packages are installed by typing - .libPaths()

1. Before you upgrade, build a temp file with all of your old packages.



tmp <- installed.packages()
installedpkgs <- as.vector(tmp[is.na(tmp[,"Priority"]), 1])
save(installedpkgs, file="installed_old.rda")
 
2. Install the new version of R ( as of Oct 2018 latest version is R3.5.1)
3. Once you’ve got the new version up and running, reload the saved packages and re-install them from CRAN.




tmp <- installed.packages()
installedpkgs.new <- as.vector(tmp[is.na(tmp[,"Priority"]), 1])
missing <- setdiff(installedpkgs, installedpkgs.new)
install.packages(missing)
update.packages()

Understanding Generative AI and Generative AI Platform leaders

We are hearing a lot about power of Generative AI. Generative AI is a vertical of AI that  holds the power to #Create content, artwork, code...