PROTECTED] On Behalf Of hadley wickham
> Sent: Tuesday, November 11, 2008 12:03 PM
> To: Wacek Kusnierczyk
> Cc: r-devel@r-project.org
> Subject: Re: [Rd] is.matrix
>
> On Tue, Nov 11, 2008 at 1:58 PM, Wacek Kusnierczyk
> <[EMAIL PROTECTED]> wrote:
> > hadley wickha
On Tue, Nov 11, 2008 at 1:58 PM, Wacek Kusnierczyk
<[EMAIL PROTECTED]> wrote:
> hadley wickham wrote:
>> On Tue, Nov 11, 2008 at 1:42 PM, Wacek Kusnierczyk
>> <[EMAIL PROTECTED]> wrote:
>>
>>> hadley wickham wrote:
>>>
> | is.matrix| returns |TRUE| if |x| is a matrix and has a |dim |
> att
Wacek Kusnierczyk wrote:
> hadley wickham wrote:
>
>>> | is.matrix| returns |TRUE| if |x| is a matrix and has a |dim |
>>> attribute of length 2) and |FALSE| otherwise
>>>
>>>
>> That's confusing! In what situations is x a matrix but does not have
>> a dim attribute?
>>
>>
>>
hadley wickham wrote:
> On Tue, Nov 11, 2008 at 1:42 PM, Wacek Kusnierczyk
> <[EMAIL PROTECTED]> wrote:
>
>> hadley wickham wrote:
>>
| is.matrix| returns |TRUE| if |x| is a matrix and has a |dim |
attribute of length 2) and |FALSE| otherwise
>>> That's confusi
Daniel Høyer Iversen wrote:
>> That's confusing! In what situations is x a matrix but does not have
>> a dim attribute?
>>
>
> That was my point. I don't find it logical that
> is.matrix(a) gives FALSE but
> is.matrix(t( t(a) )) gives TRUE.
>
that's a different story, because t() performs
ailto:[EMAIL PROTECTED] On Behalf Of Daniel
> Høyer Iversen
> Sent: Tuesday, November 11, 2008 2:36 PM
> To: hadley wickham
> Cc: Tony Plate; r-devel@r-project.org
> Subject: Re: [Rd] is.matrix
>
> > That's confusing! In what situations is x a matrix but
> does not h
On Tue, Nov 11, 2008 at 1:42 PM, Wacek Kusnierczyk
<[EMAIL PROTECTED]> wrote:
> hadley wickham wrote:
>>> | is.matrix| returns |TRUE| if |x| is a matrix and has a |dim |
>>> attribute of length 2) and |FALSE| otherwise
>>>
>>
>> That's confusing! In what situations is x a matrix but does not have
On Tue, Nov 11, 2008 at 1:35 PM, Daniel Høyer Iversen
<[EMAIL PROTECTED]> wrote:
>> That's confusing! In what situations is x a matrix but does not have
>> a dim attribute?
>
> That was my point. I don't find it logical that
> is.matrix(a) gives FALSE but
> is.matrix(t( t(a) )) gives TRUE.
>
> I a
hadley wickham wrote:
>> | is.matrix| returns |TRUE| if |x| is a matrix and has a |dim |
>> attribute of length 2) and |FALSE| otherwise
>>
>
> That's confusing! In what situations is x a matrix but does not have
> a dim attribute?
>
>
x = matrix(1,1,1)
dim(x) = c(1,1,1)
is.matrix(x)
# n
> That's confusing! In what situations is x a matrix but does not have
> a dim attribute?
That was my point. I don't find it logical that
is.matrix(a) gives FALSE but
is.matrix(t( t(a) )) gives TRUE.
I also think it would be more logical that
a=c(1,1,2)
dim(a) gives 3 1 instead of NULL,
Danie
hadley wickham wrote:
| is.matrix| returns |TRUE| if |x| is a matrix and has a |dim |
attribute of length 2) and |FALSE| otherwise
That's confusing! In what situations is x a matrix but does not have
a dim attribute?
Hadley
Yes, I suspect a typo there.
--
O__ Peter Dalgaard
> | is.matrix| returns |TRUE| if |x| is a matrix and has a |dim |
> attribute of length 2) and |FALSE| otherwise
That's confusing! In what situations is x a matrix but does not have
a dim attribute?
Hadley
--
http://had.co.nz/
__
R-devel@r-project.
Daniel Høyer Iversen wrote:
a=c(1,1,2);
is.matrix(a) gives FALSE
is.matrix(t(a)) gives TRUE
is.matrix(t(t(a))) gives TRUE
Is this correct? Shouldn't all give FALSE?
I think is.matrix should give FALSE when dimension is 1*n or n*1.
__
R-devel@r-project
Dalgaard
> Sent: Tuesday, November 11, 2008 1:31 PM
> To: Daniel Høyer Iversen
> Cc: r-devel@r-project.org
> Subject: Re: [Rd] is.matrix
>
> Daniel Høyer Iversen wrote:
> > a=c(1,1,2);
> > is.matrix(a) gives FALSE
> > is.matrix(t(a)) gives TRUE
> > is.
Daniel Høyer Iversen wrote:
> a=c(1,1,2);
> is.matrix(a) gives FALSE
> is.matrix(t(a)) gives TRUE
> is.matrix(t(t(a))) gives TRUE
>
> Is this correct? Shouldn't all give FALSE?
> I think is.matrix should give FALSE when dimension is 1*n or n*1.
No this is correct. is.matrix() returns TRUE if and
a=c(1,1,2);
is.matrix(a) gives FALSE
is.matrix(t(a)) gives TRUE
is.matrix(t(t(a))) gives TRUE
Is this correct? Shouldn't all give FALSE?
I think is.matrix should give FALSE when dimension is 1*n or n*1.
__
R-devel@r-project.org mailing list
https://stat
16 matches
Mail list logo