(defn ncol
^{:tag Integer
:doc " Returns the number of columns in the given matrix. Equivalent to R's ncol function."}
([mat]
(cond
(matrix? mat) (.columns ^Matrix mat)
(dataset? mat) (count (:column-names mat))
(coll? mat) 1 )))
Comments top
No comments for ncol. Log in to add a comment.