remove_comments: Remove comments. And empty lines.

Description Usage Arguments Value Examples

View source: R/health-parse-functions.R

Description

Anything after a "##" is removed, including the "##".

Usage

1
remove_comments(dat_txt)

Arguments

dat_txt

Character vector. Usually, but not necessarily, contains date, time, and one or more key-value pairs. Might also contain comments after "##" characters.

Value

The same character vector, but with all comments removed.

Examples

1
2
3
4
5
6
remove_comments("## this is a comment")
remove_comments("2018-08-10; 16:00; note = some text ## with some comment")
remove_comments(c(
  "## this is a comment",
  "2018-08-10; 16:00; note = some text ## with some comment")
)

ingonader/tskeyvalparser documentation built on May 5, 2019, 4:50 p.m.