Liking cljdoc? Tell your friends :D

rojure.convert


*object-type-to-primitive-type-map*clj


array-of?clj

(array-of? type obj)

categorical-varclj

(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])

raw docstring

dataframe?clj

(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
raw docstring

def-from-rcljmacro

(def-from-r rexp r-type & convert-forms)

Define a from-r method using standard boilerplate

Define a from-r method using standard boilerplate
raw docstring

from-rcljmultimethod

Convert the rosuda JRI/R type to a matching Clojure type

Convert the rosuda JRI/R type to a matching Clojure type
raw docstring

from-r-dispatchclj

(from-r-dispatch rexp)

prefer-primitive-typeclj

(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
raw docstring

r-attrclj

(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.
raw docstring

r-attr-namesclj

(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
raw docstring

r-attsclj

(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.
raw docstring

r-atts-rawclj

(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
raw docstring

r-factor-to-categorical-varclj

(r-factor-to-categorical-var rfactor)

r-has-attr?clj

(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.
raw docstring

r-map-to-attsclj

(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
raw docstring

r-trueclj

(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
raw docstring

to-rcljmultimethod

Convert the Clojure type to the proper rosuda JRI/R type

Convert the Clojure type to the proper rosuda JRI/R type
raw docstring

to-r-dispatchclj

(to-r-dispatch obj)

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close