kigubkur.io.readers
I/O: Reading function
load-Matrix
load-Rows
load-Columns
to read tab-separated value file and return (load) kigubkur© matrix representation.
(require '[kigubkur.io [readers :refer [<desired-function>]]])
or
(require '[kigubkur.io.readers :as rd])
Examples
Load a matrix
=> (rd/load-Matrix "mydata/a_matrix.tsv")
Load row vectors
=> (let [[row1 row2 row_m] (rd/load-Rows "mydata/all_rows.tsv")]
row1)
Load column vectors
=> (let [[col1 col2 col_n] (rd/load-Columns "mydata/all_columns.tsv")]
col1)
Notice that the above examples show that rows and column vectors can be obtained by sequential destructuring.
load-Columns
(load-Columns filename)
Given a filename of the tab-separated value file this function returns all the columns as respective column-vectors.
load-Matrix
(load-Matrix filename)
Given a filename of the tab-separated value file this function returns the matrix.
load-Rows
(load-Rows filename)
Given a filename of the tab-separated value file this function returns all the rows as respective row-vectors.