

I am running R version 2.8.1 on  Windows XP OS.

When I launch R, I would like to automatically read a file containing my
database connections, user ids, and passwords into my workspace.

I tried including this in my Rprofile.site file:

...
local({
old <- getOption("defaultPackages")
options(defaultPackages = c(old, "Rcmdr","RODBC", "utils"))
})

.First <- function() {
library(utils)
setwd("C:/Documents and Settings/Administrator/My Documents/R")
connections <- read.csv("connections.csv", header=TRUE)
cat("\n   Welcome to R Elaine!\n\n")
}

...

When I launch R, it does not give me any error. The working directory
appears to be set by the Rprofile.site file, but the connections object is
not in my workspace:


   Welcome to R Elaine!

Loading required package: tcltk
Loading Tcl/Tk interface ... done
Loading required package: car

Rcmdr Version 1.4-7

> ls()
character(0)


Any suggestions for how to resolve are appreciated!

**************** Elaine McGovern Jones ************************

 ISC Tape and DASD Storage Products
     Characterization and Failure Analysis Engineering
       Phone:  408  284 4853  Internal: 3-4853
       jones2@us.ibm.com




	[[alternative HTML version deleted]]


