R/code_check.R
code_remove_comments.Rd
Remove comments from code text
code_remove_comments(code_text, lang = c("R", "SPSS", "SAS", "Stata"))
the code text for a single file
the language (we only currently handle R, SPSS, SAS, Stata)
the code_text minus comment lines
code_text <- c( "# this is a comment", "", "x <- 'And this is code'" ) code_text_nc <- code_remove_comments(code_text, "R")