wrds_connect: Connect to WRDS

View source: R/wrds-connect.R

wrds_connectR Documentation

Connect to WRDS

Description

Establishes a connection to the WRDS PostgreSQL server using credentials stored securely in the system keyring.

Usage

wrds_connect(user_key = "wrds_user", password_key = "wrds_pw", keyring = NULL)

Arguments

user_key

Name of the keyring entry storing the WRDS username. Defaults to "wrds_user".

password_key

Name of the keyring entry storing the WRDS password. Defaults to "wrds_pw".

keyring

Optional keyring name. If NULL (default), uses the default keyring.

Details

Credentials must be set up before first use with wrds_set_credentials(). The connection uses bigint = "numeric" so that 64-bit integers from PostgreSQL are returned as doubles, which avoids overflow and works well with tidyverse functions.

Value

A DBIConnection object for the WRDS PostgreSQL database.

See Also

wrds_disconnect(), wrds_set_credentials()

Examples

## Not run: 
wrds <- wrds_connect()
list_subscriptions(wrds)
wrds_disconnect(wrds)

## End(Not run)

wrds documentation built on May 11, 2026, 5:06 p.m.