Re: [R] how to subset the data frame by lines

2012-08-01 Thread R. Michael Weylandt
Specifically note that, unlike C, R has true multidimensional arrays which are more than pointer jumps: the practical result of this is that you want to use a single subsetting ( x[i,j] ) and specify them both in one call -- x[i][j] instead gives you the "j"th element of the "i"th element which ma

Re: [R] how to subset the data frame by lines

2012-08-01 Thread Bert Gunter
Please read An Introduction to R, which ships with every copy of R, where you will learn how to properly subscript data frames and lists, among other things. There is a reason for such tutorials -- they enable you to avoid elementary mistakes like this and wasting time and effort with such posts as

Re: [R] how to subset the data frame by lines

2012-08-01 Thread Jorge I Velez
It is not clear to me from your description what exactly you are trying to do, but to get the numbers in the second line of aa you could use as.numeric(aa[2,]) HTH, Jorge.- On Wed, Aug 1, 2012 at 5:13 PM, Jie Tang <> wrote: > I defined a data.frame by a two-dimensional array. > > aa = data.fr