On Tue, Jun 23, 2009 at 04:00:21PM +0200, Alfredo Alessandrini wrote:
> I've a vector like this:
> 
> > inc
>   [1]        NA        NA        NA        NA        NA        NA        NA
>   [8]        NA        NA        NA        NA        NA        NA        NA
>  [15]        NA        NA        NA        NA        NA        NA        NA
>  [22]        NA        NA        NA        NA        NA        NA        NA
>  [29]        NA        NA        NA        NA        NA        NA        NA
>  [36]        NA        NA        NA        NA        NA        NA        NA
>  [43]        NA        NA        NA        NA        NA        NA        NA
>  [50]        NA        NA        NA        NA        NA        NA        NA
>  [57]        NA        NA        NA        NA        NA        NA        NA
>  [64]        NA        NA        NA        NA        NA        NA        NA
>  [71]        NA        NA        NA        NA        NA        NA        NA
>  [78]        NA        NA        NA        NA 13.095503 10.140119  7.989186
>  [85]  8.711888  7.201234 13.029250 14.430755  8.662832  8.810785 14.421302
>  [92]  7.614985  7.548091  9.843389 14.977402 20.875255  7.787543  2.005056
>  [99]  4.016916  3.601773  4.140390  7.241999 13.280794 18.038902 18.762169
> 
> I must obtain the position of first value of the vector...
> 
> In this case is 82.
> 
> > inc[82]
> [1] 13.09550

which(!is.na(inc))[1]

cu
        Philipp

-- 
Dr. Philipp Pagel
Lehrstuhl für Genomorientierte Bioinformatik
Technische Universität München
Wissenschaftszentrum Weihenstephan
85350 Freising, Germany
http://webclu.bio.wzw.tum.de/~pagel/

______________________________________________
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