(array-of? type obj)
(categorical-var & {:keys [data ordered? labels levels] :or {ordered? false}})
Returns a categorical variable based on the values in the given collection. Equivalent to R's factor function.
Options: :data (default nil) factors will be extracted from the given data. :ordered? (default false) indicates that the variable is ordinal. :labels (default (sort (into #{} data))) :levels (range (count labels))
Examples: (categorical-var :data [:a :a :c :b :a :c :c]) (categorical-var :labels [:a :b :c]) (categorical-var :labels [:a :b :c] :levels [10 20 30]) (categorical-var :levels [1 2 3])
Returns a categorical variable based on the values in the given collection. Equivalent to R's factor function. Options: :data (default nil) factors will be extracted from the given data. :ordered? (default false) indicates that the variable is ordinal. :labels (default (sort (into #{} data))) :levels (range (count labels)) Examples: (categorical-var :data [:a :a :c :b :a :c :c]) (categorical-var :labels [:a :b :c]) (categorical-var :labels [:a :b :c] :levels [10 20 30]) (categorical-var :levels [1 2 3])
(dataframe? rexp)
Returns true if the passed in object is an R dataframe, false otherwise
Returns true if the passed in object is an R dataframe, false otherwise
(def-from-r rexp r-type & convert-forms)
Define a from-r method using standard boilerplate
Define a from-r method using standard boilerplate
Convert the rosuda JRI/R type to a matching Clojure type
Convert the rosuda JRI/R type to a matching Clojure type
(from-r-dispatch rexp)
(prefer-primitive-type clazz)
If possible, ensure array is one of the primitive types. Convert if neccessary
If possible, ensure array is one of the primitive types. Convert if neccessary
(r-attr rexp attr-name)
Returns the attribute with the passed in name, or nil.
Returns the attribute with the passed in name, or nil.
(r-attr-names rexp)
Return a seq of attributes, or nil if the REXP has no attributes
Return a seq of attributes, or nil if the REXP has no attributes
(r-atts rexp)
Returns a map of the R object's attribute-names -> attributes, or nil.
Returns a map of the R object's attribute-names -> attributes, or nil.
(r-atts-raw rexp)
Returns the JRI object representing the R attributes for this object or nil if there are no attributes
Returns the JRI object representing the R attributes for this object or nil if there are no attributes
(r-factor-to-categorical-var rfactor)
(r-has-attr? rexp attr-name)
Returns true if the attribute with the passed in name exists, or false.
Returns true if the attribute with the passed in name exists, or false.
(r-map-to-atts attr-map)
Converts a map into the nested list form that rosuda JRI seems to want in its constructors
Converts a map into the nested list form that rosuda JRI seems to want in its constructors
(r-true coll)
Most R variables are collections. This tests a sequence for equality with 1 or boolean true. Returns true if all equal 1 or true, false otherwise
Most R variables are collections. This tests a sequence for equality with 1 or boolean true. Returns true if all equal 1 or true, false otherwise
Convert the Clojure type to the proper rosuda JRI/R type
Convert the Clojure type to the proper rosuda JRI/R type
(to-r-dispatch obj)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close