R/drop_comments.R

Defines functions drop_comments

drop_comments <- function(raw){
  # Strip comments from lines that are not only comments
  gsub("!.*", "",
       # Drop lines with only comments
       grep("(^ *!)", raw,
            value = TRUE, invert = TRUE)
  )
}
palderman/DSSAT documentation built on Feb. 24, 2024, 4:38 a.m.