[R] find position to last number in a vector

Anders Bjørgesæter anders.bjorgesater at bio.uio.no
Fri May 26 20:30:45 CEST 2006


Hello

Is there a function to extract the position (i.e. row number or more 
desirable the value from another column with the same rownumber ) of 
last number in a vector? This is done in a loop with 1000s of columns.

e.g.

vector/column.n: na,na,10,na,2,na,na,1,na,na
fixed column:10,20,30,40,50,60,70,80,85,100

result: 8 and/or 80

Thanks...

Best Regards
Anders



More information about the R-help mailing list