Re: [Rd] validity testing as part of '@<-'

2006-09-22 Thread Martin Morgan
While on the topic... validObject might check that the object (and its slots) is actually the new S4: > validObject(a) [1] TRUE > isS4(a) [1] FALSE > sessionInfo() R version 2.4.0 beta (2006-09-22 r39490) x86_64-unknown-linux-gnu locale: LC_CTYPE=en_US;LC_NUMERIC=C;LC_TIME=en_US;LC_COLLATE=en_U

Re: [Rd] validity testing as part of '@<-'

2006-09-22 Thread Thomas Lumley
On Fri, 22 Sep 2006, Parlamis Franklin wrote: > all those points are good ones, i just wonder what happens to S4 > "guarantees" when invalid objects are allowed to exist. one of the > advantages of methods, as i understand, is that they can be written > with absolute confidence about what is bein

Re: [Rd] validity testing as part of '@<-'

2006-09-22 Thread Parlamis Franklin
all those points are good ones, i just wonder what happens to S4 "guarantees" when invalid objects are allowed to exist. one of the advantages of methods, as i understand, is that they can be written with absolute confidence about what is being passed to them, and thus do not need to conte

Re: [Rd] validity testing as part of '@<-'

2006-09-21 Thread Byron Ellis
It also wouldn't cover objects constructed by external functions (a lot of my code produces these creatures). On 9/21/06, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 9/21/2006 5:29 PM, Parlamis Franklin wrote: > > 'methods' package feature request / discussion starter: > > > > perhaps a call t

Re: [Rd] validity testing as part of '@<-'

2006-09-21 Thread Duncan Murdoch
On 9/21/2006 5:29 PM, Parlamis Franklin wrote: > 'methods' package feature request / discussion starter: > > perhaps a call to 'validObject' should occur at part of any slot > replacement operation (and the operation not be carried out if it > would invalidate the object)? this may prevent th

[Rd] validity testing as part of '@<-'

2006-09-21 Thread Parlamis Franklin
'methods' package feature request / discussion starter: perhaps a call to 'validObject' should occur at part of any slot replacement operation (and the operation not be carried out if it would invalidate the object)? this may prevent the need for prophylactic 'validObject' calls in other us