# What is already installed on the local computer installed <- library()$results[,"Package"] # What does FSA need that is not installed FSA.depend <- c("exactRankTests","MASS","plotrix","quantreg","Rcapture","reshape","utils") FSA.dep.log <- FSA.depend %in% installed FSA.need <- FSA.depend[!FSA.dep.log] # What does NCStats need that is not installed NCStats.depend <- c("car","gplots","Hmisc","multcomp","nortest","sciplot","tcltk","TeachingDemos") NCStats.dep.log <- NCStats.depend %in% installed NCStats.need <- NCStats.depend[!NCStats.dep.log] ## Package from RForge.net install.packages(c("FSA","FSAdata","NCStats"),,"http://www.rforge.net/") ## Load what is needed All.need <- c(FSA.need,NCStats.need) if (length(All.need)>0) { chooseCRANmirror() install.packages(All.need) }