View source: R/ThirdPartyFunctions.R
countSpaces | R Documentation |
Counts the number of spaces in a character string.
countSpaces(x)
x |
A character string. |
A vector of numeric values identifying the number of instances of spaces (' ') in x, and the number of consecutive spaces in an instance.
Josh Bredeweg, Reddit user jbraids1421
https://www.reddit.com/r/rstats/comments/2th8ic/function_to_count_the_number_of_white_spaces/
countSpaces("abc def")
countSpaces("abc def ghi jkl mno")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.