lighttable - Simple clojure program doesn't work -
i trying follow example in clojure data analasys cookbook. using lighttable play program. first example shows how read in .csv data.
i used lein new getting-data. added 2 dependencies project file
(defproject getting-data "0.1.0-snapshot" :description "fixme: write description" :url "http://example.com/fixme" :license {:name "eclipse public license" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [ [org.clojure/clojure "1.5.1"] [incanter/incanter-core "1.4.1"] [incanter/incanter-io "1.4.1"] ] )
then in core.clj file below, using cmd-shift-enter in lighttable evaluate program, exceptions:
(use 'incanter.core 'incanter.io)
clojure.lang.compiler$compilerexception: java.lang.runtimeexception: unable resolve symbol: use in context, compiling:(/users/idf/documents/clojure/getting-data/src/getting_data/core.clj:1:1)
(read-dataset "data/small-sample.csv")
clojure.lang.compiler$compilerexception: java.lang.runtimeexception: unable resolve symbol: read-dataset in context, compiling:(/users/idf/documents/clojure/getting-data/src/getting_data/core.clj:4:1)
not sure doing wrong?
"unable resolve symbol: use in context" means light table environment unable evaluate anything: nothing incanter-related can problem. not using light table, can't offer further advice on fixing it, looks you've somehow wandered namespace doesn't have clojure.core
referred. should work if (clojure.core/refer 'clojure.core)
before rest of code want run, of course that's not supposed necessary.
Comments
Post a Comment