I'd like to maximize numbers in a vector and get the results as a new vector
Like this:
w <- 0:10
maximizer <- function(w){
max(10, w + 5)
}
I'm expecting getting a vector (10,10,10,10,10,10,11,12,13,14,15), but all I'm getting is 15. I know weird ways of fixing this, but I'm sure there must be an easier way...