# TODO: Add comment
# 
# Author: E.Korsching Jun 12, 2012
###############################################################################


#### collection of packages install script

getOption("repos")

#Setting the repository
#
#Every time you install a R package, you are asked which repository R should use.
#To set the repository and avoid having to specify this at every package install, simply:
#  create a file .Rprofile in your home area.
#Add the following piece of code to it:
#  cat(".Rprofile: Setting UK repository\n")
#r <- getOption("repos")	#read content
#r["CRAN"] <- "http://cran.uk.r-project.org" #write new CRAN link
#options(repos=r)
#rm(r)



#### install packages with all dependencies

install.packages("maxent", dependencies=TRUE)		#maximum entropie classifier or low memory multinomiallogistic regression



#### function to load all (assumed are function definition-)files of a directory in a R workspace

sourceDir <- function(path, trace=TRUE, ...) {					#function from R manual
	for (nm in list.files(path, pattern="\\.[Rr]$")) {
		if(trace) cat(nm,":")           
		source(file.path(path, nm), ...)
		if(trace) cat("\n")
	}
}


# sample: load all perm functions at once
sourceDir(path="/home/korschi/eclipseR/0functions/perm")
