Add an aggregation field to the palmsplus_fields table.

palms_add_field(name, formula, domain_field = FALSE)

Arguments

name

The name of the field as a string.

formula

The formula as a string. The formula can contain other fields previously specified.

domain_field

Logical. If TRUE, this field will be summarised for each domain when palms_build_days is run.

Value

If the palmsplus_fields table is not present in the global environment, it will be created. If it already exists, the new field will be appended.

Examples

palms_add_field("pedestrian", "tripmot == 1") palms_add_field("moving", "pedestrian | tripmot == 2") #notice this contains previous field