[R] How to retrieve value form dataframe by Key?

Manish Gupta mandecent.gupta at gmail.com
Thu May 24 10:09:58 CEST 2012


Hi, 

I have one datagrame 

Col1      Col2        Col3                                                                         
Col3
xxx         er            This is third record of 1st line.               
This is 4th record of first line.
xxy         er            This is third record of 1st line.               
This is 4th record of second line
xyx         er            This is third record of 1st line.               
This is 4th record of third line

I want to get records corresponding to key (here Col1). How can i implement
it?

e.g. 
if i key in xxx i should get 
xxx         er            This is third record of 1st line.               
This is 4th record of first line.

if i key in xxy i should get 
xxy         er            This is third record of 1st line.               
This is 4th record of second line

Regards


--
View this message in context: http://r.789695.n4.nabble.com/How-to-retrieve-value-form-dataframe-by-Key-tp4631173.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list