countSpaces {HLAtools} | R Documentation |
Count the Spaces in a Character String
Description
Counts the number of spaces in a character string.
Usage
countSpaces(x)
Arguments
x |
A character string. |
Value
A numeric value representing the number of spaces (' ') in x.
Author(s)
Josh Bredeweg, Reddit user jbraids1421
Source
https://www.reddit.com/r/rstats/comments/2th8ic/function_to_count_the_number_of_white_spaces/
Examples
countSpaces("abc def")
[Package HLAtools version 1.1.1 Index]