# NOT RUN {
## compute quanitiles for each network agent
con <- dbConnect(PostgreSQL(), user="user", password="passwd",dbname="dbname")
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