Dear all,

I'd appreciate any help to rectify what must be a misconception of mine how
environments work:

##########################
myEnv <- new.env()
myEnv$a.env <- 1
myEnv$symbols.env <- "a.env"

a.global <- 2
symbols.global <- "a.global"

myFun <- function(symbols){do.call("print", lapply(symbols, FUN=as.name))}

do.call("myFun", list(symbols.global)) #prints a.global -- so far, so good.

with(myEnv,
{
    do.call("myFun", list(symbols.env))
})
# Error in print(a.env) : object 'a.env' not found

# However, attaching myEnv works fine:
attach(myEnv)
do.call("myFun", list(symbols.env))
##########################

Why is this?

	[[alternative HTML version deleted]]

