Hi the list,
I have some trouble using validity, intialize and the constructor. More
precisely, what should go where?
Here is a toy exemple (seams long, but the code is very simple):
I want to define an object with two slots a and b with the properties that
b will be either empty or the scare
setClass("A",
representation(a="numeric",b="numeric"),
validity = function(object) {
if (length([EMAIL PROTECTED])!=length([EMAIL PROTECTED]))
return("different lengths of a and b")
if (length([EMAIL PROTECTED])==0)
return("object length is zero")
TRUE
}
)
Do not chan
Do not change initialize!
As I sat, this is a toy example. In my real example, initialize does a
lot of things like calculation of quality indice (b is not the scare of
a, but B1, B2 and B3 are the the within matrix of A after imputation
with 3 differents methods), giving names to some matr
Hi,
From the R Language Definition, Section 3.4.1:
"If i is positive and exceeds length(x) then the corresponding
selection is NA. A negative out of bounds value for i causes an error."
(This is also mentioned in S Programming, footnote of page 24.)
Can someone please provide an example tri
On Fri, May 2, 2008 at 2:23 PM, Vincent Goulet
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> From the R Language Definition, Section 3.4.1:
>
> "If i is positive and exceeds length(x) then the corresponding selection is
> NA. A negative out of bounds value for i causes an error."
>
> (This is also mentio
On 5/2/2008 3:23 PM, Vincent Goulet wrote:
Hi,
From the R Language Definition, Section 3.4.1:
"If i is positive and exceeds length(x) then the corresponding
selection is NA. A negative out of bounds value for i causes an error."
(This is also mentioned in S Programming, footnote of page 24
On 5/2/2008 3:29 PM, hadley wickham wrote:
On Fri, May 2, 2008 at 2:23 PM, Vincent Goulet
<[EMAIL PROTECTED]> wrote:
Hi,
From the R Language Definition, Section 3.4.1:
"If i is positive and exceeds length(x) then the corresponding selection is
NA. A negative out of bounds value for i causes
Le ven. 02 mai à 15:46, Duncan Murdoch a écrit :
On 5/2/2008 3:23 PM, Vincent Goulet wrote:
Hi,
From the R Language Definition, Section 3.4.1:
"If i is positive and exceeds length(x) then the corresponding
selection is NA. A negative out of bounds value for i causes an
error."
(This is al