On 18.05.2015 09:14, Partha Sinha wrote:
I am using Win 7, 32 bit and R 3.2.0 I want to install few packages via script. The script should first check if the package is already installed (I dont want update).
assume the packages are given in a character vector pkg. pkg <- c("MASS", "A") Then: inst <- installed.packages()[,1] install.packages(setdiff(pkg, inst)) Best, Uwe Ligges
If the package is already there , then it would go to the next package in my list.
How can I do this ? Parth ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.