Comment out codes based on their languages.
comment_out(x, engine, extra_syntax = character(0L))
x | A character vector |
---|---|
engine | A string that defines the engine of the |
extra_syntax | A named character vector which defines extra syntax to comment out.
Each values should contain |
# Default behaviors comment_out("R language", "R")#> [1] "# R language"comment_out("Python language", "python")#> [1] "# Python language"# A customized behavior comment_out( "Python language", "python", extra_syntax = c("python" = '"""%s"""') )#> [1] "\"\"\"Python language\"\"\""