[email protected] wrote:
> Hi Wacek: Somewhere I remember reading that environments have
> functionality like lists EXCEPT for the names part. IIRC, I think that
> I read this in the R Language Reference manual also.
>
>
this would be a confused and confusing statement, unless 'functionality'
has some rather vague sense here. (which would not be very
surprising.) if you find it, i humbly suggest that you politely report
it as a statement to be fixed.
there are important differences between environments and lists, in
particular wrt. to assignment:
l = list(a=1)
ll = l
l$a = 0
l$a == ll$a
# FALSE
e = new.env()
e$a = 1
ee = e
e$a = 0
e$a == ee$a
# TRUE
this is a fundamental difference, one that could/should be more
carefully acknowledged in functions that return objects represented with
environments as opposed to lists (e.g., srcfile).
vQ
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.