It looks like a sound solution.
Thanks Vitalie.
Vitalie S. wrote:
Hi,
RG> Hi,
RG> I'm wondering if the following behaviour is normal:
RG> setClass('A', representation(number='numeric'), RG>
validity=function(object){ RG> if( obj...@number < -1 )
return("Invalid number")
Hi,
RG> Hi,
RG> I'm wondering if the following behaviour is normal:
RG> setClass('A', representation(number='numeric'), RG>
validity=function(object){ RG> if( obj...@number < -1 )
return("Invalid number"); TRUE})
>> [1] "A"
RG> a <- new('A')
RG> a
>> An
Hi Martin,
Indeed the validObject works, but I was expecting it to be called
automatically after a slot assignment.
I understand the fact that during their construction, objects' slots are
sometime not valid, and thought the check=FALSE was there for such cases.
My validity method needs to ch
> "RG" == Renaud Gaujoux
> on Mon, 10 Aug 2009 17:19:12 +0200 (SAST) writes:
RG> Hi,
RG> I'm wondering if the following behaviour is normal:
RG> setClass('A', representation(number='numeric'),
RG> validity=function(object){
RG> if( obj...@number < -1 ) return("I
4 matches
Mail list logo