Reputation: 18585
I've recently came across Deducer, it crossed my mind to have a look at it and I progressed to installing the package. After searching through CRAN it occurred to me that there is a number of packages that support Deducer:
Instead of running:
install.packages("Deducer")
install.packages("DeducerExtras")
I would prefer to run a loop for all the packages that have Deducer string in the name. Hence my question, how can I get list of packages from CRAN where name matches specific string and install them in a loop?
Upvotes: 1
Views: 175
Reputation:
Quite raw:
out <- available.packages()
libs <- as.vector(out[grep("Deducer", out[,1]),1])
lapply(libs, install.packages)
Upvotes: 3