Why not simply uppercase the first letter after a word boundary?
> lastname <- c("wortmann-kool", "mulder", "nistelrooij", "camp", "schaake", "veld", "lange", "oomen-ruijten")
> gsub("\\b(\\w)", "\\U\\1", lastname, perl = TRUE)
[1] "Wortmann-Kool" "Mulder" "Nistelrooij" "Camp"
[5] "Schaake" "Veld" "Lange" "Oomen-Ruijten"
>
Quoting from the documentation:
For perl = TRUE only, it can also contain "\U" or "\L" to convert the rest of the replacement to upper or lower case and "\E" to end case conversion.
## capitalizing
txt <- "a test of capitalizing"
gsub("(\\w)(\\w*)", "\\U\\1\\L\\2", txt, perl=TRUE)
gsub("\\b(\\w)", "\\U\\1", txt, perl=TRUE)