Use vapply instead of sapply
Created by: jwpestrak
At least one major R contributor - Hadley Wickham - has advised against using sapply in functions. Instead he advocates lapply or vapply.
See https://twitter.com/hadleywickham/status/434339083871993856 http://stackoverflow.com/questions/12339650/why-is-vapply-safer-than-sapply