Skip to content
Prev 316829 / 398506 Next

If() values in one dataframe then return values from another

Hello,

Try the following.


mA <- sapply(seq_len(nrow(data1)), function(i) if(any(data1[i,] == 3)) 
meter[i, 1] else NA)


Hope this helps,

Rui Barradas

Em 04-02-2013 17:48, Steven Ranney escreveu: