pmin
and pmax
from the base package. The function sum
simply does not help when the objective is to obtain a vector with parallel sum rather than a scalar value.psum(..., na.rm = FALSE)
TRUE
or FALSE
, the defaultpsum(us2012$Obama, us2012$Romney)
swingy <-psum(us2012$Obama, us2012$Romney-100)
Run the code above in your browser using DataLab