Learn R Programming

cjar (version 0.2.0)

filter_then: Create the filter sequence then object

Description

This function creates a 'then' list object which restricts the time constraint of a filter to be added to a sequence filter.

Usage

filter_then(limit = "within", count = 1, unit = "year")

Value

a structured list of time restrictions to be used to build the sequential filter

Arguments

limit

The limitation of the restriction. Either within (default) or after

count

How many of the units should be used. 1 is set as default.

unit

A unit of time. Valid values are hit, visit, minute, hour, day, week (default), month, quarter, or year. Always use the singular form.

Details

Combining filter_then arguments

In the UI you can add 'after' and 'within' statements to create a more complex time restriction. The same can be accomplished using this function by listing the limits, counts, and units in a c() function. This would look like: limit = c('within', 'after'), count = c(5, 1), unit = c('hit', 'visit')

Using within and after in the same time filter_then function call

Time restrictions can only be combined using 'within' first before 'after'. The function will automatically align these to be in the correct list item order.

A word about unit values

Currently pageviews and dimensions are not supported unit values.