rk.fields: Process Fields Clause

Description Usage Arguments Value

View source: R/rklib.r

Description

The function parses the fields clause and returns the modified string as per the specified mode. The fields clause supported format is represented by the following BNF:

1
2
3
<field.list> := <field.expr> ( DELIMIT.COMMA <field.expr> ) *
<field.expr> := ( FIELD.NAME | <aggr.func> LEFT.PAREN FIELD.NAME RIGHT.PAREN ) [ AS.ALIAS FIELD.NAME ]
<aggr.func> := FUNC.MIN | FUNC.MEDIAN | FUNC.AVG | FUNC.MAX | FUNC.COUNT | FUNC.SUM

Usage

1
rk.fields(fields, mode = "@")

Arguments

fields

clause following simplified sql syntax.

mode

specifies the parsing logic. The default value '@' returns the field list in perfmeter query format. The '+' value returns a field list used for grouping the dataframe with alias names. The '=' value returns a field list used for grouping the dataframe with original names. The '*' value returns the alias list used for renaming the columns. Any other value returns a field list used for selecting columns from a dataframe.

Value

The function returns the processed fields clause.


nJira documentation built on March 26, 2020, 7:56 p.m.