View source: R/word_count.R View source: R/break_lines.R
word_count | R Documentation |
Function to break lines at a specified width. Finds nearest white space to 80 characters and breaks the line there.
Function to count words in an Rmd file. YAML headers and Code Chunks are ignored and optional lines to skip can be included.
word_count(txtfile, skip_lines = NULL)
word_count(txtfile, skip_lines = NULL)
txtfile |
path and filename of a file to count the words |
skip_lines |
a numeric vector indicating lines of the file to skip. These lines are removed prior to removing YAML and code chunks. Default is NULL. |
outfile |
Output file to save |
width |
integer indicating width at which to set line break. Defaults to 80 characters. |
yaml |
Logical indicating whether or not YAML should be included. Not yet implemented. |
chunks |
Logical indicating whether or not code chunks should be included. Not yet implemented. |
my_file <- system.file('extdata/test.Rmd',package='miscPackage')
word_count(my_file)
#@export
my_file <- system.file('extdata/test.Rmd',package='miscPackage')
word_count(my_file)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.