View source: R/TextFunctions.R
stripComments | R Documentation |
Function to strip comments from elements of a character vector.
stripComments(strv, comment = "#")
strv |
|
comment |
|
The returned character vector will not have the same number of elements as the original if the latter had elements that were only comments or 'blank' elements. Thus, one use of this function could be to remove blank lines, comment-only lines, and commented text from a character vector created by reading a text file using readLines().
character vector with comments removed.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.