Thank you Jorge and Florent for your responses.

Now, I 'd like to get the date *(and its index) *where myvalue < 2000 for
the first time. 
I expect for a result like (index, date) = (3, 2012-01-07 )

This way does not work:
ind = match(df$myvalue <2000, df$myvalue)
res = df$DateTime[ind]

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

______________________________________________
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