scicloj / clojisr

Clojure speaks statistics - a bridge between Clojure to R
https://scicloj.github.io/clojisr/
Eclipse Public License 2.0
147 stars 9 forks source link

Why wrapping TRUE -> [true]? #21

Closed genmeblog closed 3 years ago

genmeblog commented 4 years ago

I think that simple TRUE, FALSE or NA values should be converted to true, false and nil without wrapping into a vector.

genmeblog commented 4 years ago

Also when function returns one value unwrap it from a vector. For example:

(base/choose 12 4)
;; => [1] 495
(r->clj (base/choose 12 4))
;; => [495.0]

;; To access the value and reuse you have to take out first element
(first (r->clj (base/choose 12 4)))
;; => 495.0
genmeblog commented 4 years ago

https://clojurians.zulipchat.com/#narrow/stream/224816-clojisr-dev/topic/DSL/near/190545773

genmeblog commented 3 years ago

Closing.