# NOT RUN {
## compute quantiles for each network agent
con <- dbConnect(PostgreSQL(), user= "user", password="passwd", dbname="sample")
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))
# }
Run the code above in your browser using DataLab