View source: R/display_selected_code_comments.R
display_selected_code_comments | R Documentation |
Displays selected comments
display_selected_code_comments(path = ".", pattern = NULL, label = "")
path |
a character vector of full path names; the default corresponds to the working directory, getwd(). Tilde expansion (see path.expand) is performed. Missing values will be ignored. Elements with a marked encoding will be converted to the native encoding (and if that fails, considered non-existent). Defaults to ".". |
pattern |
an optional regular expression. Only file names which match the regular expression will be returned. |
label |
Optional regex expression that can be used to limit the comments found by adding each element of the character vector in turn immediately after "<!–" in the regex expression. The resulting logical vectors are OR'd together to combine their results. |
Dataframe of selected comments with the base file name, the comment label, the comment start line, and the comment text.
Internally uses the list.files
function with the path
and
pattern
arguments as defined in the call. Other arguments to
list.files
are forced as follows:
TRUE
TRUE
TRUE
TRUE
FALSE
FALSE
The user is free to create the list of files anyway desired and provide them
to the path
argument.
files = system.file("testdata", "find_html_comment_test_file_1.Rmd",
package = "rmsutilityr")
display_selected_code_comments(path = dirname(files),
pattern = "Rmd",
label = "RMS")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.