View source: R/stream-editor.R
stream_editor | R Documentation |
R equivalent of GNU-sed
stream_editor(raw_lines, pattern, target, replacement)
raw_lines |
a vector of readLines from the file |
pattern |
a regex pattern to match |
target |
target string to be replaced |
replacement |
replacement string to be substituted |
raw_lines : modified vector of lines
example_string <- "\\target{} \\not_a_target{}"
texor::stream_editor(example_string,"\\s*\\\\target\\{\\}", "\\\\target", "\\\\hit")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.