     (spit (io/resource "bootstrap.R") bootstrap)))
 
 (defn initialize
-  [file packages]
+  "Generates a bootstrap.R file and executes scripts/start.sh in a shell
+   Typically starting a new RServe with the generated file 'sourced'"
+  [packages]
   (create-bootstrap packages)
   (sh (io/as-relative-path "scripts/start.sh")))
 

      (str e))))

(defn execute
  [file method params callback]
  (with-open [R (pirate/connect)]
    (try

(def ^:private default-packages ["RJSONIO"])

(def ^:private load-template
  (str "l = tryCatch(require('%1$s'), warning=function(w) w);"
       "if(is(l, 'warning')) print(l[1])"))

(def ^:private bootstrap-template "#AUTO-GENERATED\nsource('%s')\n")

