The documentation says

vapply is similar to sapply, but has a pre-specified type of return value, so it can be safer [...] to use.

Could you please elaborate as to why it is generally safer, maybe providing examples?


P.S.: I know the answer and I already tend to avoid sapply. I just wish there was a nice answer here on SO so I can point my coworkers to it. Please, no "read the manual" answer.

Edit
Report