db.obj object contains the ID of the connection that its
data resides on. This function returns the connection ID number. The
user can also change the connection ID that a
An integer, the connection ID number. The user is allowed to change
the connection ID that is associated with
An integer, the connection ID associated with
Author: Predictive Analytics Team at Pivotal Inc.
Maintainer: Frank McQuillan, Pivotal Inc. [email protected]
db.connect creates connections to the databases.
db.disconnect disconnects an existing connection.
db.list lists all the current connections with their
connection info has all functions that can extract
information about the database connection.
conn.eql tests whether two connections are actually the
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
## Not run: ## set up the database connection ## Assume that .port is port number and .dbname is the database name cid1 <- db.connect(port = .port, dbname = .dbname, verbose = FALSE) cid2 <- db.connect(port = .port, dbname = .dbname, verbose = FALSE) db.list() # list the two connections conn.eql(cid1, cid2) # returns TRUE ## use the example data to create a table in connection 1 delete("abalone", conn.id = cid2) x <- as.db.data.frame(abalone, "abalone", conn.id = cid1, verbose = FALSE) db.disconnect(cid1) # disconnect connection 1 ## lookat(x) # gives an error since connection 1 is disconnected conn.id(x) <- cid2 # 1 and 2 are the same lk(x) # gives what you want db.disconnect(cid2, verbose = FALSE) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.