db: Interface with databases

dbR Documentation

Interface with databases

Description

Interface with project databases.

Usage

writeDBTable(
  name,
  value,
  overwrite = FALSE,
  append = FALSE,
  row.names = FALSE,
  host = getOption("aakmisc.dbhost", "localhost"),
  dbname = getOption("aakmisc.dbname", NULL),
  port = getOption("aakmisc.port", 5432),
  user = getOption("aakmisc.user", NULL),
  ...
)

getQuery(
  statement,
  host = getOption("aakmisc.dbhost", "localhost"),
  dbname = getOption("aakmisc.dbname", NULL),
  port = getOption("aakmisc.port", 5432),
  user = getOption("aakmisc.user", NULL),
  ...
)

getMLEs(
  host = getOption("aakmisc.dbhost", "localhost"),
  dbname = getOption("aakmisc.dbname", NULL),
  port = getOption("aakmisc.port", 5432),
  user = getOption("aakmisc.user", NULL),
  ...
)

recMLEs(
  mle,
  host = getOption("aakmisc.dbhost", "localhost"),
  dbname = getOption("aakmisc.dbname", NULL),
  port = getOption("aakmisc.port", 5432),
  user = getOption("aakmisc.user", NULL),
  ...
)

recScript(
  files,
  host = getOption("aakmisc.dbhost", "localhost"),
  dbname = getOption("aakmisc.dbname", NULL),
  port = getOption("aakmisc.port", 5432),
  user = getOption("aakmisc.user", NULL),
  ...
)

dropScript(
  script,
  host = getOption("aakmisc.dbhost", "localhost"),
  dbname = getOption("aakmisc.dbname", NULL),
  port = getOption("aakmisc.port", 5432),
  user = getOption("aakmisc.user", NULL),
  ...
)

listScripts(
  host = getOption("aakmisc.dbhost", "localhost"),
  dbname = getOption("aakmisc.dbname", NULL),
  port = getOption("aakmisc.port", 5432),
  user = getOption("aakmisc.user", NULL),
  ...
)

catScript(
  script,
  file = "",
  host = getOption("aakmisc.dbhost", "localhost"),
  dbname = getOption("aakmisc.dbname", NULL),
  port = getOption("aakmisc.port", 5432),
  user = getOption("aakmisc.user", NULL),
  ...
)

Arguments

name, value

Name and contents of table to create.

overwrite, append, row.names

See dbWriteTable.

host

Hostname on which to connect to the PostgreSQL server.

dbname

Name of PostgreSQL database.

port

Port on which to connect to PostgreSQL database. If NULL, a random port number will be used.

user

Username to use in conneting to PostgreSQL database. If NULL, Sys.getenv("USER") will be used.

...

Additional arguments will be passed to dbConnect.

statement

SQL statement passed to dbGetQuery.

mle

A data-frame of MLEs to be recorded.

files

Files containing R scripts to be recorded.

script

Name of script.

file

File to which the script will be written. See cat.

Author(s)

Aaron A. King

Examples

## Not run: 
startTunnel()
listScripts()
stopTunnel()

## End(Not run)

kingaa/aakmisc documentation built on Sept. 16, 2024, 9:24 p.m.