This works but I do not know if there is a better way

tmp  = df[df$myvalue<2000,]
ind = match(tmp$myvalue, df$myvalue)
res = df$DateTime[ind]

solution = list(ind[1], res[1])

--
View this message in context: 
http://r.789695.n4.nabble.com/dataframe-how-to-select-an-element-from-a-row-tp4311881p4312890.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