| content | R Documentation |
db.obj object
A db.data.frame object's content is the table/view name that it
points to. A db.Rquery object's content is the SQL query that
represents the operations applied on an existing
db.data.frame. This function is mainly for debugging. Normal
user who is not familiar with SQL does not need to use it.
content(x)
x |
A |
A string, the content of db.obj object x. A
db.data.frame object's content is the table/view name that it
points to. A db.Rquery object's content is the SQL query that
represents the operations applied on an existing db.data.frame.
Author: Predictive Analytics Team at Pivotal Inc.
Maintainer: Frank McQuillan, Pivotal Inc. fmcquillan@pivotal.io
db.obj, db.data.frame,
db.table, db.view,
db.Rquery explain the definitions of the class
hierarchy of this package.
## Not run:
## set up the database connection
## Assume that .port is port number and .dbname is the database name
cid <- db.connect(port = .port, dbname = .dbname, verbose = FALSE)
delete("abalone", conn.id = cid)
y <- as.db.data.frame(abalone, "abalone", conn.id = cid) # create a table
x <- db.data.frame("abalone", conn.id = cid, key = "id")
## actually, x and y are pointing the same table
eql(x, y) # returns TRUE
content(x)
content(x$id)
content(x$id < 10)
content(x[,1:5])
content(x == y) # this is different from eql(x, y)
content(sort(x, INDICES = x$id))
content(x[x$id<10,])
content(x[1:10,])
content(colSums(x))
content(by(x, NULL, sum))
content(by(x, x$sex, sum))
db.disconnect(cid, verbose = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.