hadley/stringr — pull request #37 by ajdamico (2014-10-20 13:16:42+00:00)
Title: more useful error message when NAs break str_pad

missing values break str_dup inside str_pad.. currently it displays-

> str_pad( c( 'hi' , NA , 'hello' ) , 5 )
Error in rep.int(string[i], times[i]) : invalid 'times' value

i didn't propose putting this inside check_string() because other functions (such as str_length and str_sub) that use check_string() do accept missing values

hope this makes sense..thanks!