Description Usage Arguments Value
View source: R/uncomment_marked_lines.R
Sometimes commands which work on the client side do not work or are detrimental on your side. (Think install.packages lines, or file system commands.)
This function takes an .R script file and uncomments any lines previously marked for uncommenting. Lines can be added to your version with a pattern e.g. ##UNCOMMENT##
, and then removed when the code is shipped back to the client.
1 2 3 4 5 | uncomment_marked_lines(
file,
new_file_name,
uncomment_pattern = "##UNCOMMENT##$"
)
|
file |
character string with file path to .R file. |
new_file_name |
character string with file path (and name) for the output .R file. |
uncomment_pattern |
Regular expression for finding uncomment marker. Any lines containing this pattern are uncommented. |
If file runs cleanly, then output is TRUE
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.