Last data update: 2014.03.03

R: Automatic separator data input
table_importR Documentation

Automatic separator data input

Description

A small variation of the original read.table that most of the time detect automatically the field separator character. It also includes the option to run the format_corrector function in order to detect, for example, the date variables included in the original data set. If the function don't recognize any separator, it asks to specify the real one.

Usage

table_import(file,sep=F,format_corrector=F,...)

Arguments

file

The patch to he file which the data are to be read from.

sep

The field separator character, see read.table.If it is not specified, the function try to detect it automatically.

format_corrector

If True, it runs the format_corrector function before returning the data frame.

...

More arguments from read.table.

Details

The format_corrector function is a complicated function so it's not recommended to run it unless the data set contains awkward variables like dates.

Value

A data frame containing the data stored in the file.

Note

This function might have problems if any of the fields contain typical separators, so it's always recommended to check the resulting data frame in order to avoid possible errors.

See Also

read.table

Examples

## Not run: 
x <- table_import('mydata.csv',format_corrector=T)


## End(Not run)

Results