Sorry if this is a silly question. I'm trying to extract all elements
of a dataframe at a particular row.
How about
df[12, ]
to get row number 12?
I can find no mention of this in any documentation
You must have different documentation than me
Subsetting is described on the first
On Thu, 2003-10-09 at 12:02, Mark Lee wrote:
Sorry if this is a silly question. I'm trying to extract all elements
of a dataframe at a particular row. I can find no mention of this in
any documentation and it may be naivety of dataframe on my part as I'm
very green at this. Thankyou,
If d is
Mark Lee wrote:
Sorry if this is a silly question. I'm trying to extract all elements
of a dataframe at a particular row. I can find no mention of this in
any documentation and it may be naivety of dataframe on my part as I'm
very green at this. Thankyou,
Mark
Df[x, ]
Read 'an introduction to R' and 'FAQ'
-Ursprüngliche Nachricht-
Von: Mark Lee [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 9. Oktober 2003 18:02
An: [EMAIL PROTECTED]
Betreff: [R] Getting rows from a dataframe
Sorry if this is a silly question. I'm trying to extract all
I have this right on the desk in front of me. I have gone through most
of this actually and have been looking for the answer for several
weeks now before resorting to this. The only reference I've found to
this is on page 20 under array indexing but didn't see the relation to
dataframes. Thanks,
If you're having so much trouble, perhaps it's because you want to get a
vector result? This requires a little more, and if so, perhaps one of the
following provides what you are looking for:
x - data.frame(a=1:3,b=4:6)
# row as a data frame
x[2,]
a b
2 2 5
# row as a list
x[2,,drop=T]
Message-
From: Mark Lee [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 09, 2003 12:02 PM
To: [EMAIL PROTECTED]
Subject: [R] Getting rows from a dataframe
Sorry if this is a silly question. I'm trying to extract all elements of a
dataframe at a particular row. I can find no mention