Learn R Programming

qryflow (version 0.2.0)

is_tag_line: Detect the presence of a properly structured tagline

Description

Checks whether a specially structured comment line if formatted in the way that qryflow expects.

Usage

is_tag_line(line)

Value

Logical. Indicating whether each line matches tag specification.

Arguments

line

A character vector to check. It is a vectorized function.

Details

Tag lines should look like this: -- @key: value

  • Begins with an inline comment (--)

  • An @ precedes a tag type (e.g., type, name, query, exec) and is followed by a colon (:)

  • A value is provided

Examples

Run this code
a <- "-- @query: df_mtcars"
b <- "-- @exec: prep_tbl"
c <- "-- @type: query"

lines <- c(a, b, c)

is_tag_line(lines)

Run the code above in your browser using DataLab