sendQuery: Sending queries to the UTD API server in order to download...

View source: R/AggFunctions.R

sendQueryR Documentation

Sending queries to the UTD API server in order to download data with a built query

Description

This function retruns the data and a package citation

Usage

sendQuery(utd_api_key = NULL, table_name = "", query = list(),
  citation = TRUE)

Arguments

utd_api_key

An API key provided by a server manager at UTD

table_name

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

query

A list of query elements or a single query element a user builds with other query functions.

citation

logical; If TRUE, then a package citation will be printed at the end of data retrival.

Value

A list with components

  • $data a data frame of requested data. An attribute of the data can be formatted as data.frame. Please check the features of data if it's necessary

  • $citation a text of the package citation

Note

If an error message is returned, please increase the memory size of R. This error is more frequently occurred in a Windows machine.

Examples

## Not run:  # to store the ICEWS subset in the vector of myData without the citation
myData <- sendQuery(utd_api_key,"icews", query_element, citation = FALSE)
## End(Not run)

KateHyoung/UTDEventData documentation built on Nov. 16, 2022, 2:29 p.m.