Sum of values in vectors



examples/vectors/sum.R
y = c(2, 7, 3)
sum(y)       # 12

sum(TRUE)    # 1
sum(FALSE)   # 0

the_truth = c(TRUE, FALSE, TRUE, TRUE, FALSE)
sum(the_truth)    # 3