WriteLRN: save *.lrn files

Description Usage Arguments Details Author(s) References See Also

Description

save data, column Header, and column type definition to a *.lrn file

Usage

1
WriteLRN(FileName, Data, Header, Key, DataDefined, OutDirectory, CommentOrDigits)

Arguments

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

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

Details

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,..).

Author(s)

Michael Thrun

References

www.uni-marburg.de/fb12/datenbionik databionics@mathematik.uni-marburg.de

See Also

ReadLRN, addext


aultsch/DataIO documentation built on May 14, 2019, 10:34 p.m.