R expression of an SQL query. Expressions created with gmExpr can be used as well.
envir
defines the environment used for evaluation of expr.
EXPR
The quoted version of such an expression.
sel
The selection statement in R representation.
limit
defines the number of lines returned in the query.
db
defines the database, on which the query will be run.
gmNameVarID
The gmVarID in the gmDatabase of gmName for later referencing of an object by its name in the gmDatabase.
Value
For gmRead a dataframe is returned. It contains the requested data.
For gmReadInternal a call is returned, consisting of an expression to be interpreted as
the R representation of SQL by gmSQL. Furthermore a list of the asked variables in
EXPR and the columns, where to look in the database tables are returned, too.
Details
gmRead is the principal function of the gmDatabase package. It provides the main functionality: Receiving an R expression expr of an SQL query, it returns a dataframe, containing the requested data. On the other hand, gmReadInternal, indicated by its notation, is meant for in-package use only. During the execution of gmRead it creates a call containing the R representation, which is used later in gmSQL to create and run a proper SQL query against the database.
## Not run: # .gmDB <- dbConnect(...)# root <- "root"# erg <- gmRead(root)# ## returns the ID of root in the database# # gmRead(root$project[gmTitle=group])# ## groups# ## End(Not run)