Section 28 Vector: Implicit Coercion

The one exception to this is the special value NA (Not Available) used to signify a missing value

28.1 Example: Implicit coercion

y <- c(TRUE, 2)    # numeric
y <- c(1.7, "a")   # character
y <- c("a", TRUE)  # character


a <- rep(c(T,F), length=5)
b <- c(1:5)
c <- letters[1:5]

a
b
c

c(a,b)
c(a,c)
c(b,c)
c(a,b,c)

a + b
a + c  # Error
b + c  # Error