8.16.0.1
Delimited Reading
(require dlm-read) | package: dlm-read |
The goal of dlm-read is to provide functionality similar to dlmread in Matlab/Octave.
WARNING! this library is unstable. The actual results of dlm-read may change, however the result will remain something easily to plot.
procedure
file : (or/c port? path-string?) = (current-input-port) delimiter : char? = #\tab
Parsed delimited data into a matrix ready for plotting.
file is the input file or port containing the data.
delimiter is the character used to delimit the data.
1 Examples
Here is an example matrix in text (separated by tags):
"simple.tab"
1 2
3 4
To parse this data:
Alternatively, a port can be used:
> (require dlm-read racket/port)
> (with-input-from-string "1\t2\n3\t4" (lambda () (dlm-read))) '((1 3) (2 4))