db: Interface with databases

Description Usage Arguments Author(s) Examples

Description

Interface with project databases.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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

1
2
3
4
5
6
## Not run: 
startTunnel()
listScripts()
stopTunnel()

## End(Not run)

kingaa/aakmisc documentation built on Sept. 29, 2018, 9:33 p.m.