Why TRUE == “TRUE” is TRUE in R?
According to the help file ?`==` : 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. So TRUE is coerced to “TRUE” (i. e. as.character(TRUE)), hence the equality. The equivalent of an … Read more