[Rd] scientific notation and comparison with character variable
tobias.verbeke at openanalytics.eu
Wed Jan 2 19:53:17 CET 2013
Thanks and apologies for the noise.
On 01/02/2013 07:43 PM, Joshua Ulrich wrote:
> It's expected. From ?"<":
> If the two arguments are atomic vectors of different types, one is
> coerced to the type of the other, the (decreasing) order of
> precedence being character, complex, numeric, integer, logical and
>> as.character(1e-2) < 0.05
>  TRUE
>> as.character(1e-4) < 0.05
>  FALSE
> Joshua Ulrich | about.me/joshuaulrich
> FOSS Trading | www.fosstrading.com
> On Wed, Jan 2, 2013 at 12:38 PM, Tobias Verbeke
> <tobias.verbeke at openanalytics.eu> wrote:
>> Is the following expected and/or documented?
>>> 1e-2 < "0.05"
>>  TRUE
>>> 1e-4 < "0.05"
>>  FALSE
>> Many thanks in advance for any pointer.
>> R Under development (unstable) (2013-01-01 r61512)
>> Platform: i386-w64-mingw32/i386 (32-bit)
>>  LC_COLLATE=English_United States.1252
>>  LC_CTYPE=English_United States.1252
>>  LC_MONETARY=English_United States.1252
>>  LC_NUMERIC=C
>>  LC_TIME=English_United States.1252
>> attached base packages:
>>  stats graphics grDevices utils datasets methods base
>> R-devel at r-project.org mailing list
More information about the R-devel