R/test.rkdb.R

Defines functions test.rkdb

Documented in test.rkdb

#' Run simple series of tests for qserver
#' Note: Start kdb+ instance on localhost:5000 before running this function
#' @export
test.rkdb <- function() {
  h=open_connection()   # default is localhost:5000

  execute (h,"sp:([]s:10?`3;p:10?`1;qty:100*10?10)")
  s=execute(h,"select[5] from sp")
  execute (h,"a:.z.d")
  execute (h,"b:a+100 * til 5")
  execute (h,"c:.z.z")
  execute (h,"d:c+1.23 * til 5")

  print(s)
  print(execute(h,"b"))
  print(execute(h,"d"))

  close_connection(h)
}

Try the rkdb package in your browser

Any scripts or data that you put into this service are public.

rkdb documentation built on June 7, 2017, 9:02 a.m.