Description Usage Arguments Details Value Author(s) See Also Examples
This function checks if two db.obj objects are the
equivalent. For objects of class db.data.frame,
they need to have the same associated table.
For objects of other types, they need to have identical expressions and the same associated table.
1 2 | ## S4 method for signature 'db.obj,db.obj'
eql(e1,e2)
|
e1, e2 |
The signature of the method. Both arguments are |
Objects of type db.data.frame are considered equal
if they have the same content representation, and their
associated tables have the same name, connected datbase, and type. Objects of other types derived from db.obj are considered equal if they have the same values for content representation, @.source, @.parent, @.expression, @.where, @.conn.id, @.col.data_type, @.is.factor and @.col.name. Two objects of different types are always considered not equal.
A logical. Returns TRUE is the objects are equal.
Author: Predictive Analytics Team at Pivotal Inc.
Maintainer: Frank McQuillan, Pivotal Inc. fmcquillan@pivotal.io
lk or lookat Displays the actual data in a db.obj object.
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 | ## 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)
as.db.data.frame(abalone, "abalone", conn.id = cid, verbose = FALSE)
x <- db.data.frame('abalone', conn.id = cid, key = 'id') # use default connection 1
y <- db.data.frame('abalone', conn.id = cid)
## Check for equality
eql(x,y) # This returns true
## create a db.Rquery object
z <- x[,] # x is a db.data.frame object, but z is not
eql(x,z) # This returns false
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.