krsp_connect: Connect to the krsp database

Description Usage Arguments Value Examples

View source: R/krsp-connect.r

Description

krsp_connect is a wrapper for src_mysql that connects to the KRSP database. By default, this function will connect to a local copy of the database as root user with no password. When connecting to a remote database, the host, username, and password must be supplied. This information can be passed as parameters to krsp_connect, however, it's much safer to store these authentication parameters in a my.cnf file. Consult the vignette for this package for further details.

Usage

1
2
krsp_connect(dbname = "krsp", host = "localhost", port = 0L,
  user = "root", password = "", group = NULL, ...)

Arguments

dbname

database name; defaults to krsp

host, port

character; host name and port of krsp database. Defaults to a local instance of the database.

user, password

character; username and password. For a local instance of the database, these can typically be left as is; however, to connect to a remote instance of the krsp database these will be user specific and must be supplied.

group

character; my.cnf option group

...

Additional arguments passed on to src_mysql.

Value

A connection to the krsp database for use with dplyr.

Examples

1
2
con <- krsp_connect()
krsp_tables(con)

mstrimas/krsp documentation built on May 23, 2019, 8:16 a.m.