snubian wrote:
> I've noticed a behaviour when using rownames() that I think is odd,
> wondering if I'm doing something wrong.
>
> To illustrate, say I create a very simple matrix (called fred):
>
> fred<-matrix(,4,2)
>
> It looks like this:
>
> [,1] [,2]
> [1,] NA NA
> [2,] NA NA
>
om: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of snubian
Sent: Monday, March 02, 2009 4:59 PM
To: r-help@r-project.org
Subject: [R] Error setting rowname if rowname currently NULL
Hi,
My first post here and new to R so please bear with me (long time program
THe problem is that 'rownames(fred)' is NULL and therefore you will
have to define the names of all the rows:
> fred<-matrix(,4,2)
> fred
[,1] [,2]
[1,] NA NA
[2,] NA NA
[3,] NA NA
[4,] NA NA
> rownames(fred)
NULL
> rownames(fred) <- c("Apple",'','','')
> fred
[,1] [,2]
Hi,
My first post here and new to R so please bear with me (long time programmer
though, helping a friend with some scripts).
I've noticed a behaviour when using rownames() that I think is odd,
wondering if I'm doing something wrong.
To illustrate, say I create a very simple matrix (called fred
4 matches
Mail list logo