Learn R Programming

gdldata (version 0.1)

gdl_request: Data request function

Description

Data request function

Usage

gdl_request(session)

Value

A data frame containing the data returned from the GDL API.

Arguments

session

A valid GDL session object to interface with.

Examples

Run this code
if (FALSE) {
# Create a session using your API token (provided by environment here)
session <- gdl_session(Sys.getenv('GDL_API_TOKEN'))
# Customize parameters
session <- set_indicator(session, 'iwi')
session <- set_country(session, 'IND')
# Finally, request the data from GDL
iwi_india <- gdl_request(session)
iwi_india[1:5, 3:8]
# (showing only the five rows and columns for illustrative purposes)
}

Run the code above in your browser using DataLab