Description Usage Arguments Value Author(s) Examples
Get the number of characters in an object. It supports recursive counting for lists.
1 2 3 |
x |
Object. Vector, matrix, list or data frame. |
rm.blank |
Logical: default TRUE, and ” will be coerced to NA. |
... |
Other arguments to pass to |
An object of the same structure with x
.
Yiying Wang, wangy@aetna.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
count_char(c("dws", 23)) # return c(3, 2)
count_char(matrix(c("dws", 23, "2332", 1), ncol=2)) # return
## [,1] [,2]
## [1,] 3 4
## [2,] 2 1
count_char(list("dws", 23, c("2332", 1))) # return
## [[1]]
## [1] 3
##
## [[2]]
## [1] 2
##
## [[3]]
## [1] 4 1
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.