Message-ID: <49987B12.4040205@idi.ntnu.no>
Date: 2009-02-15T20:29:06Z
From: Wacek Kusnierczyk
Subject: matrix transpose
In-Reply-To: <809f80020902151136pe0699b6s1211ec2cf3b90e2e@mail.gmail.com>
Roger wrote:
> This is supposed to be an easy operation, but R 2.8.1 on Mac OS X gives me a
> lot trouble. the t() function simply does not work properly. What I mean is
> it works sometimes but does not work at the most of the time, even with the
> same matrix.
>
> this is an example taken from R help
>
>
>> a <- matrix(1:30, 5,6)
>> t(a)
>>
> Error in t(a) : unused argument(s) (1:30)
>
> It just gives this error. If I restart my Mac (Yeah, have to restart the
> OS), then there are chances t() works, but sometimes it still does not work.
>
does it ever fail if you try the example in a fresh r session (i.e., one
without anything executed before this code)?
when it fails, what is t? have you redefined t to be some other
function, in particular, a no-argument one, as here:
t = function() NULL
a = matrix(1:30, 5, 6)
t(a)
# Error in t(a) : unused argument(s) (1:30)
this is most likely what happens here.
vQ