table_import: Automatic separator data input

Description Usage Arguments Details Value Note See Also Examples

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

1

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

1
2
3
4
5
## Not run: 
x <- table_import('mydata.csv',format_corrector=T)


## End(Not run)

ImportExport documentation built on May 1, 2019, 8:05 p.m.