Description Usage Arguments Details Author(s) References See Also
save data, column Header, and column type definition to a *.lrn file
1 | WriteLRN(FileName, Data, Header, Key, DataDefined, OutDirectory, CommentOrDigits)
|
FileName |
string, name of the file to be written |
Data |
matrix of data , cases in rows , variables in columns, may contain NaN, NA or any other missing number symbol |
Header |
Optional: cell array or string matrix with column Header (d data columns) plus eventual header for Key as first entry |
Key |
Optional: a numeric vector, unique number for each line, by default 1:n, n being the number of data points |
DataDefined |
Optional: vector of column type: keys (0=ignore,1=data,2,3=class,9=key), default is only 1's with leading 9 |
OutDirectory |
Optional: string, name of directory the data will be saved in, default |
CommentOrDigits |
either a string which is inserted as CommentOrDigits in the first line in the file. if it is a number then it is the number of significant digits (after the "."), default 6 |
Comfortably writes data to a file in the LRN Format.
See dbt/ZFileFormatDocuments/lrn.html for a documentation of the format.
The length of Key
has to be ncol(Data)
or ncol(Data[[1]])
respectively.
If Key
is empty it is replaced by a vector 1:ncol(Data)
If Names
is empty, it is replaced by default names
:
The default name for a DataDefined==9
column is 'Key'.
The default name for a DataDefined==3
column is 'Cls'.
The default name for DataDefined==1 or ==2
is 'C1', 'C2', etc.
DataDefined may
only contain numbers 0,1,2,3 and one 9.
If DataDefined
it is replaced by c(9,1,..).
Michael Thrun
www.uni-marburg.de/fb12/datenbionik databionics@mathematik.uni-marburg.de
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.