Skip to content
Back to formatted view

Raw Message

Message-ID: <m2r4fq8na1.fsf@krugs.de>
Date: 2013-06-25T11:04:06Z
From: Rainer M Krug
Subject: Perplexed with environment

Hi

I migrated from Linux to Mac, but I don't this has anything to do with
it, but I am not sure.

I am writing a small logger package, in which I have a file 

aaa.R:
,----
|  .logData <- new.env()
|   assign("loggingThreshold", 10, envir = .logData)
|   assign("logToFile", FALSE, envir = .logData)
|   assign("logFileName", NULL, envir = .logData)
| 
|   assign("logToConsole", TRUE, envir = .logData)
|   ##
|   assign("logHeaderLevel", 0, envir = .logData)
|   assign("logHeader", "", envir = .logData)
|   assign("logHeaderClock", "", envir = .logData)
|   assign("timeFormat", "", envir = .logData)
`----
to initialize some logging parameter.
 
When I load my package, everything looks fine, only that the environment
logger:::.logData is (nearly) empty:

,----
| > library(logger)
| > ls(envir=logger:::.logData, all.names=TRUE)
| [1] ".logHeader"      ".logHeaderClock" ".logHeaderLevel"
`----

I assume I am doing something really basic wrong?

A copy of the package is available at:

https://www.dropbox.com/s/hv6abepcczrljum/logger_0.0-1.tar.gz

Thanks,

Rainer

PS: I am planning to making it available when it is working (again)

-- 
Rainer M. Krug

email: RMKrug<at>gmail<dot>com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 486 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20130625/30e544b4/attachment.bin>