[R] Re : Sort out number on value
Jeff Newmiller
jdnewmil at dcn.davis.CA.us
Fri Apr 20 21:00:25 CEST 2012
I think
x[x>7.5]
gives more unsurprising results when none of the data meets the criteria than
x[which(x>7.5)]
does.
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.
David Winsemius <dwinsemius at comcast.net> wrote:
>
>On Apr 20, 2012, at 9:49 AM, Yellow wrote:
>
>> I now filtered the Na and Inf out of my data.
>> And the number is exactly the same als the output from the excel
>file.
>>
>> Thanks everyone. :)
>> Now I can finish my work.
>
>In the future it might be safer to use subset() or perhaps
>x[which(x>7.5)]. That would omit the NA or NaN values (although it
>might not remove the Inf values, but I didn't realize the Excel had a
>concept of Inf).
>
>--
>
>David Winsemius, MD
>West Hartford, CT
>
>______________________________________________
>R-help at 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.
More information about the R-help
mailing list