Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- con <- dbConnect(RMySQL::MySQL(), host = "localhost",dbname="rbaseball"
- ,user = "root", password = "")
- dbWriteTable(con, "mtcars", mtcars, overwrite = TRUE)
- res <- dbSendQuery(con, "SELECT * FROM mtcars ORDER BY cyl")
- dbApply(res, INDEX="cyl", FUN = function(x,grp) {quantile(x$mpg)})
Add Comment
Please, Sign In to add comment