Remove comments from code text
Usage
code_remove_comments(
code_text,
lang = c("R", "Python", "SPSS", "SAS", "Stata", "Mplus", "MATLAB")
)Examples
code_text <- c(
"# this is a comment",
"",
"x <- 'And this is code'"
)
code_text_nc <- code_remove_comments(code_text, "R")
