On Thu, Jul 30, 2009 at 4:03 PM, Martin Morgan wrote:
> S4 objects are mutable in the sense that one can write replacement methods
> for them
Understood, but I don't think that's the usual meaning of 'mutable'.
-s
__
R-help@r-project.org m
Stavros Macrakis wrote:
On Thu, Jul 30, 2009 at 12:01 PM, Martin Morgan wrote:
S4 objects do not have the semantics of environments, but of lists (or of most
other R objects), so it is as meaningful to ask why identical(s1, s2) returns
TRUE as it is to ask why identical(list(x=1), list(x=1)) r
On Thu, Jul 30, 2009 at 12:01 PM, Martin Morgan wrote:
> S4 objects do not have the semantics of environments, but of lists (or of
> most other R objects), so it is as meaningful to ask why identical(s1, s2)
> returns TRUE as it is to ask why identical(list(x=1), list(x=1)) returns TRUE.
Thanks
Hi Stavros --
Stavros Macrakis writes:
> To test two environments for object equality (Lisp EQ), I can use 'identity':
>
>> e1 <- environment(local(function()x))
>> e2 <- environment(local(function()x))
>> identical(e1,e2) # compares object identity
> [1] FALSE
>> identical(
To test two environments for object equality (Lisp EQ), I can use 'identity':
> e1 <- environment(local(function()x))
> e2 <- environment(local(function()x))
> identical(e1,e2) # compares object identity
[1] FALSE
> identical(as.list(e1),as.list(e2))# compares values as na
5 matches
Mail list logo