sort {PivotalR} | R Documentation |
This function is used to sort a table of view in the database.
## S4 method for signature 'db.obj' sort(x, decreasing = FALSE, INDICES, ...)
x |
The signature of the method.
A |
decreasing |
A logical, with default value as FALSE. Should the sort be increasing or decreasing? |
INDICES |
A list of |
... |
Further arguments passed to or from other methods. This is currently not implemented. |
A db.Rquery
object. It is the query object used to sort the db.obj
in the
database.
Author: Predictive Analytics Team at Pivotal Inc.
Maintainer: Frank McQuillan, Pivotal Inc. fmcquillan@pivotal.io
by
has similar syntax to this function.
lk
or lookat
to view portion of the data table
## 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) x <- as.db.data.frame(abalone, conn.id = cid, verbose = FALSE) lk(x, 10) y <- sort(x, decreasing = FALSE, list(x$id, x$sex) ) # get the SQL query to be run content(y) # get the sorted output lk(y, 20) db.disconnect(cid, verbose = FALSE) ## End(Not run)