Skip to content

using nrow to identify one row

3 messages · Gregory Gentlemen, Henrique Dallazuanna, Gábor Csárdi

#
nrow is for number of rows in matrix/data.frame, here you can use:

NROW(temp[1,])
length(temp[1,])

But if you want the index of row try this:

unique(row(temp)[1,])
On 14/03/2008, Gregory Gentlemen <gregory_gentlemen at yahoo.ca> wrote:

  
    
#
Try 

temp[1,,drop=FALSE]

See ?"[" for the explanation.

Gabor
On Fri, Mar 14, 2008 at 04:46:10PM -0400, Gregory Gentlemen wrote: