adding an R interface
cleaned up SQLq and a DB a bit. Forgot to close R Sessions - fixed.