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 object of class
Hi,
I'm wondering if the following behaviour is normal:
setClass('A', representation(number='numeric'),
validity=function(object){
if( obj...@number -1 ) return(Invalid number); TRUE})
[1] A
a - new('A')
a
An object of class “A”
Slot number:
numeric(0)
a...@number - 0
a...@number - -3
a
An
RG == Renaud Gaujoux ren...@mancala.cbio.uct.ac.za
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
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
5 matches
Mail list logo