Complementing:

findInterval(x[is.finite(x)], 1:20)


On Fri, Oct 1, 2010 at 2:55 PM, Henrique Dallazuanna <www...@gmail.com>wrote:

> Try this:
>
> x[is.finite(x)]
>
>
>
> On Fri, Oct 1, 2010 at 2:51 PM, <mlar...@rsmas.miami.edu> wrote:
>
>> I calculated a large vector.  Unfortunately, I have some measurement error
>> in my data and some of the values in the vector are erroneous.  I ended up
>> wih some Infs and NaNs in the vector.  I would like to filter out the Inf
>> and NaN values and only keep the values in my vector that range from 1 to
>> 20.  Is there a way to filter out Infs and NaNs in R and end up with a
>> clean vector?
>>
>> Mike
>>
>> ______________________________________________
>> 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.
>>
>
>
>
> --
> Henrique Dallazuanna
> Curitiba-Paraná-Brasil
> 25° 25' 40" S 49° 16' 22" O
>



-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

        [[alternative HTML version deleted]]

______________________________________________
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