[R] assigning to a list in a package environment

Sean Davis sdavis2 at mail.nih.gov
Wed May 11 23:22:03 CEST 2005


I have a list in a package environment

assign('refflat',list(),pos='package:locPkg')

to which I would like to make assignments like:

refflat[['a']] <- read.table('fileA.txt')
refflat[['b']] <- read.table('fileB.txt')

I am doing this to guard against a local version of refflat hanging 
around, as I want to refresh it with each new session (and so, want to 
store it in the package environment).  I just can't quite get hot to 
make that work so that I am storing to the package:refflat rather than 
any in .GlobalEnv.

Thanks,
Sean




More information about the R-help mailing list