ReadData: reads *.data files

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

This function reads files in the *.data format.

The *.data file format enables the user to import data to Microsoft Excel, Mathworks Matlab and allows to inspect and edit data within every text editor. *.data file format is a tab separated csv file with specific header. To prevent failures each column is saved with a CRC-32 checksum. Every *.data file contains a DataDefined line which describes the data in each column. The key column is a unique column of integer values. One value codes exactly one data record, where this one line of data equals one observation. Numbers are stored under Data inside the file Strings, using DataDefined = 9,0,1. Strings are saved as Names using DataDefined = 6. DataDefined 2,3 and 8 are used for internal purposes.

Usage

1
ReadData(FileName, InDirectory=getwd())

Arguments

FileName

string, name of the *.data file

InDirectory

string of the directory containing the *.data file

Details

ReadData is the primary resource to read a *.data file. For the corresponding write function see WriteData.

Value

Data

a [n,k] matrix containing the data

Header

string vector with the names for the key and data columns, by default 'Key' for DataDefined==9, 'Cls' for DataDefined==3, 'C1', 'C2', 'C3', 'C4', etc. for DataDefined==1 or ==2. Note: must not contain whitespace

DataDefined

vector of column type: entry (0='ignore', 1='data'(numeric), 2='other'(numeric), 3='class'(numeric), 6='Names'(character), 8='class'(character), 9='key'(numeric)), default is only 1's or 6's with leading 9

Key

a numeric vector, unique number for each line, by default 1:n, n being the number of data points

Names

string matrix of short identifiers for each line to be put as last column. If not available value is NULL

Author(s)

Tim Schneider, Michael Thrun

References

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

See Also

WriteData

Examples

1
2
3
4
5
#Read the file "test.data" from the current directory
#ReadData("test.data") 

#Read the file "test.data" from given path
#ReadData("test.data", DataDirectory = "~/Desktop/") 

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