returnRegExp: Building a query element, which indicates a certain pattern...

Description Usage Arguments Value Note Examples

View source: R/AggFunctions.R

Description

This function creates a query element to indicate a certain pattern of a variable

Usage

1
returnRegExp(api_key = "", table_name = "", pattern = "", field = "")

Arguments

api_key

An API key provided by a UTD server manager

table_name

A name of a data table. Input strings are NOT case-sensitive.

pattern

A pattern or a feature of a specified variable

field

A field (variable) of a data table

Value

A list of the query element of a certain pattern of a particular variable in a data table

Note

Please use this function only with the field that is not used in the other query element function. For instance; if you subset the data with a certain country, use the function, 'returnCountries()'.

Examples

1
2
3
4
5
6
7
## Not run: 
# to get all source actors related to governments in ICEWS
reg <- returnRegExp(api_key, "icews","GOV","Source Name")
# to subset the cline_phoenix_nyt data by year == 2001
nytQuery <- returnRegExp(api_key, 'cline_phoenix_nyt', '2001', 'year')
myNYTdata <- sendQuery(api_key, 'cline_phoenix_nyt', nytQuery, citation = F)
## End(Not run)

KateHyoung/UTDEventData documentation built on March 24, 2019, 4:48 a.m.