Category: Rstat

Clojure Integration with R

(require ‘[tnoda.rashinban :as rr] ‘[tnoda.rashinban.core :as rc] ‘[clojure.core.matrix.dataset :as dt] ‘[clojure.core.matrix.impl.dataset :as id]) ;; CREATE A TOY DATA (def ds [{:id 1.0 :name “name1”} {:id 2.0 :n…continue reading.

Parse CSV File with Headers in Clojure

; (defproject prj “0.1.0-SNAPSHOT” ; :dependencies [[org.clojure/clojure “1.8.0”] ; [org.clojars.bmabey/csvlib “0.3.6”] ; [ultra-csv “0.2.1”] ; [incanter “1.5.7”] ; [semantic-csv “0.2.1-alpha1”] ; [org.clojure/data.csv “0.1.4”]]) (require ‘[csvlib :…continue reading.

For Loop and Map in Clojure

;; DEFINE THE DATABASE (def db {:classname “org.sqlite.JDBC” :subprotocol “sqlite” :subname “/home/liuwensui/Downloads/chinook.db”}) ;; CALL PACKAGES (require ‘[clojure.java.jdbc :as j] ‘[criterium.core :as c] ‘[cloju…continue reading.