rmdwcl {rmdwc} | R Documentation |
Word-, character and non-whitespace characters count for a text
Description
Counts words, characters and non-whitespace characters in a string. Is used in rmdcount
, see details there.
Usage
rmdwcl(rmd, space = "[[:space:]]", word = "[[:space:]]+", line = "\n")
Arguments
rmd |
character: R Markdown document as string |
space |
character: pattern to split a text at spaces (default: |
word |
character: pattern to split a text at word boundaries (default: |
line |
character: pattern to split lines (default: |
Value
a list
Examples
file <- system.file('rmarkdown/rstudio_pdf.Rmd', package="rmdwc")
fcont <- readChar(file, file.info(file)$size)
rmdwcl(fcont)
[Package rmdwc version 0.3.0 Index]