Update the makeVector function

Using the proposed changes by Patrik Gillen
https://class.coursera.org/rprog-002/forum/thread?thread_id=370#comment-
826