Arguments

this

An object from the class Connect. This object stores the list of available variable names and time domains.

name.patterns

A character vector of variable system name patterns that will be used with grep to find matches.

label.patterns

A character vector of variable label names patterns that will be used with grep to find matches.

and

If multiple filtering arguments are supplied, then this controls whether variables have to match all of
the criteria (and=TRUE) or any of the criteria (and=FALSE).

variable.names

Character vector containing Causata variable system names.

domains

Character vector containing Causata variable time domains.

...

Extra unused arguments.

Details

These functions create lists of variables that are filtered according to the given criteria.

Vinclude returns a character array of all variables matching the provided criteria. If the
criteria are left at their default values (NULL) then a list of all available variables is returned.

Vexclude works in the same manner as Vinclude, except that variables matching the criteria are excluded.
If variable.names is NULL then the matching process begins with all avaible variables.
If variable.names contains variable names then the matching process will select from the provided names.

Vtime appends time domains to the variables.

To see a list of the available variables and time domains, open a Connect object and view the embedded
data frames of variable metadata. See the example below for details.

Value

Vinclude, Vexclude, and Vtime return a vector of character strings naming variables found in Causata.

BacktickCollapse returns a single character string with the variables names concatenated together and surrounded by
backticks. This string can be used directly in a SQL query to Causata.

Author(s)

See Also

Examples

# Some of these examples require a Causata connection, so they are not run## Not run:
conn <-Connect(group="example")# View available variablesView(conn$variables)# View available time rangesView(conn$timeRanges)# View available time pointsView(conn$timePoints)# Get a list of variables matching the given labels: all online and demographics
variables <-Vinclude(conn, label.patterns=c("online","demographics"))# Get a list of all variables except those with "test" in the name
variables <-Vexclude(conn, name.patterns="test")# build a query string and extract data
query.str <-paste("select",BacktickCollapse(variables),"from customers")df<-GetData(conn, query.str)Close(conn)## End(Not run)# simple example with BacktickCollapseBacktickCollapse(c("variable-one","variable-two"))