Hi everyone, please help me to avoid re-install package when executing/run the code in R-script,
Day 1: I install ~40 packages to analyse the data (I work with R-project). Then i save the R-script
Day 2: I open the R-project and keep working on it. I use Source() to run all the code in R-script that I worked in day 1. However, when I use Source(), all the packages (~40 packages) re-install again and they send me ~40 messages (pls see the image)
My group (Win-Vector LLC) teaches to not mix installing packages and doing work in scripts. We advise: make one script that only installs packages, and have other scripts only attach the packages with the library() command (and all at the top of the script so you notice any not-installed packages early).
I did check the script and yes...I had some install.packages command in the script Now to avoid that problem, I make one script for installs packages, and other scripts only attach the packages with the library()!
If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Hereβs how to do it: