
## ----------------------- ##
## defaultRStudio.Rprofile ##
##
##
##  This file should be saved to 
##     $RPROJS/defaultRStudio.Rprofile
##
##  Then 
##     ln -s $RPROJS/defaultRStudio.Rprofile $RHOME/.Rprofile
##     ln -s $RPROJS/defaultRStudio.Rprofile /home/rstudio/.Rprofile
##
##  WHERE 
##     #  export RHOME="/usr/lib/R"
##     #  export RPROJS="/mnt/data/rprojs/"
## ----------------------- ##

## Set Default DB
options("db.defaulthost"="10.156.228.102")

## Base folder where files, projects etc will be located

"~~~~~~~~~~~~~~~~~~~~~~~~~~~"
stop("THIS PROFILE IS OLD AND OUT-OF-DATE")
"~~~~~~~~~~~~~~~~~~~~~~~~~~~"

.base <- "/mnt/data/rprojs/"


# set these into the options
options(baseDir=.base, utilsFolder=paste0(.base, "utils/"))

# re-source the utils, unless specified not to
if (!isTRUE(getOption("dontReloadUtils"))) {
	# if the utilSource() function does not exist, load it
	if (!exists("utilSource")) {
		# Try a few different locations
		if(inherits(try (source(paste0(getOption("baseDir"),     "utilsRS.r")), silent=TRUE), "try-error"))
			try (source(paste0(getOption("utilsFolder"), "utilsRS.r")), silent=TRUE)
	}
	if (!exists("utilSource")) 
		warning("Could not find `utilSource`. It appears utilsRS.r has not been loaded.")
	else 
		utilSource()
}

setwd(.base)
# cleanup
rm(.base)


 #--------------------------------

THESE ARE THE CURRENT ERRORS ON STARTUP


Warning message:
In utilSource() :
  Loading main `utilsRS` file was unsuccessful and encountered the following error
	"Error in rownames(installed.packages()) : 
  could not find function "installed.packages""

Error in file(filename, "r", encoding = encoding) : 
  cannot open the connection
In addition: Warning message:
In file(filename, "r", encoding = encoding) :
  cannot open file '/home/rstudio/git/misc/rscriptsutilsRS.r': No such file or directory

		Utils Loaded on Startup

data.table 1.8.10  For help type: help("data.table")
> traceback()
No traceback available 
> utilSource()