mdbapply {MonetDB.R} | R Documentation |
dbApply
is used to switch the data from the normal auto-commiting mode into transactional mode. Here, changes to the database will not be permanent until dbCommit
is called. If the changes are not to be kept around, you can use dbRollback
to undo all the changes since dbTransaction
was called.
mdbapply(conn, table, fun, ...)
conn |
A MonetDB.R database connection. Created using |
table |
A MonetDB database table. Can also be a view or temporary table. |
fun |
A R function to be run on the database table. The function gets passed a single |
... |
Other parameters to be passed to the function |
Returns the result of the function applied to the database table.
## Not run: conn <- dbConnect(MonetDB.R(), "demo") data(mtcars) dbWriteTable(conn, "mtcars", mtcars) mpgplus42 <- mdbapply(conn, "mtcars", "double", function(d) { d$mpg + 42 }) ## End(Not run)