Assuming your data.frame has the name "data," you would extract arbitrary
row n by 

data[n, ]

Daniel 


-------------------------
cuncta stricte discussurus
-------------------------

-----Ursprüngliche Nachricht-----
Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Im
Auftrag von Henrik Kallberg
Gesendet: Thursday, August 20, 2009 7:56 AM
An: r-help@r-project.org
Betreff: [R] How to extract row values?

Dear All!
I'm trying to extract one specific row from a data frame without columnnames
being included. I only want a 1-dimensional vector that consists of the
specific data on this row. Here's an example:
existing data:
column names: v1v2v3
Row 1             ab cd ef
Row 2             gh ij kl
Row 3             mn op qr
This is what I want to extract:
ab cd ef
I do not want: v1v2v3
                     ab cd ef
Thank you in advance
Henrik

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to