countSpaces {HLAtools} | R Documentation |
Counts the number of spaces in a character string.
countSpaces(x)
x |
A character string. |
A numeric value representing the number of spaces (' ') in x.
Josh Bredeweg, Reddit user jbraids1421
https://www.reddit.com/r/rstats/comments/2th8ic/function_to_count_the_number_of_white_spaces/
countSpaces("abc def")