[r] How to square all the values in a vector in R?