Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Try it:
"hello" > 0
I tried using as.numeric("hello") but it just gave me back NA. What gives?
as.numeric("hello")
NA
因为0是被迫的"0"。见help(">"):
0
"0"
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.