Try it:
"hello" > 0
I tried using as.numeric("hello")
but it just gave me back NA
. What gives?
Because 0
is coerced to "0"
. See help(">")
:
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
raw.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With