dbApply-methods {RMySQL} | R Documentation |
Applies R/S-Plus functions to groups of remote DBMS rows without bringing an entire result set all at once. The result set is expected to be sorted by the grouping field.
dbSendQuery
).FUN
.
See the Database Interface definition document
DBI.pdf
in the base directory of this package
or
http://stat.bell-labs.com/RS-DBI.
MySQL
mysqlDBApply
dbSendQuery
fetch
## Not run: ## compute quanitiles for each network agent con <- dbConnect(MySQL(), group="vitalAnalysis") rs <- dbSendQuery(con, "select Agent, ip_addr, DATA from pseudo_data order by Agent") out <- dbApply(rs, INDEX = "Agent", FUN = function(x, grp) quantile(x$DATA, names=FALSE)) ## End(Not run)