Description Usage Arguments Value Examples
View source: R/count_chr_words.R
This function counts the number of words and characters in a given string. The user can decide weather to count spaces as characters or not.
1 | count_chr_words(text, count_spaces)
|
text |
The string whose words and characters will be counted. Parameter is called text since it makes intuitive sense to the user (they are inputting written text). |
count_spaces |
Weather spaces in the string should be counted as characters (TRUE or FALSE). count_spaces is pretty self explanatory. We are asking the user if they should count spaces as character or not. |
A numeric vector whose first element
is the number of words in the string and second element is number
of characters in the string. c(words, characters)
1 2 | count_chr_words("hello world", count_spaces = TRUE)
count_chr_words("AATTCCTTTCGGTG", count_spaces = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.