Here is the procedure: 1. With the old version of R running (either before you install the new version, or after but selecting the old version in Tools/Project Options), run this next chunk.
JMLUtils::adm.savePkgLib()
This function saves the names of all the packages in library of the old version. The file containing those names is located in the folder selected by the 'folderLocation' function below; it's hard-coded for which machine you're on.
Install (if necessary) and activate the new version of R. Normally the new version will boot up automatically after it's installed, but you can also manually select in in the Tools/Project Options menu).
Open an R GUI window, being sure you are using the new version of R. Then load JMLUtils. (DO NOT do this from RStudio!) Then run the function JMLUtils::restorePkgLib().
If there are a lot of packages, the recompliation process will take a good while to finish.
candidates <- c( Sys.getenv("R_PROFILE"), file.path(Sys.getenv("R_HOME"), "etc", "Rprofile.site"), Sys.getenv("R_PROFILE_USER"), file.path(getwd(), ".Rprofile") ) Filter(file.exists, candidates)
Additional Notes:
If necessary (usually only if a major R upgrade, e.g. from v. 4.x to version 5.x etc. be sure to upgrade your development tools, so you'll be able to build all the packages in the new R version. see here for doc: https://support.rstudio.com/hc/en-us/articles/200486498-Package-Development-Prerequisites Basically if there is a new version of RTools, download and install from here: https://cran.rstudio.com/bin/windows/Rtools/. Then make sure it's on system PATH per doc recommendations I don't think you need devtools available in the new version to make this work, but you might. In that case, you'll need to install that first, manually, and then go from there. Check this link: https://www.r-project.org/nosvn/pandoc/devtools.html
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.