[R] dataframe: how to select an element from a row

ikuzar razuki at hotmail.fr
Fri Jan 20 00:42:58 CET 2012


Hi, 
I 'd like to select the Date where myvalue =1800 appears the* first time*.

For instance:
df =data.frame(date, myvalue, ...)

...

Date                            myvalue
2012-01-05                2500                
2012-01-06               2450
*2012-01-07               1800*
2012-01-08                2200
2012-01-09                1800

I'd like to retrieve the third line.

I do not find a clean way.

Thanks for your help



--
View this message in context: http://r.789695.n4.nabble.com/dataframe-how-to-select-an-element-from-a-row-tp4311881p4311881.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list