Learn R Programming

ImportExport (version 1.3)

table_import: 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.

Value

A data frame containing the data stored in the file.

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.

See Also

read.table

Examples

Run this code
# NOT RUN {
x <- table_import('mydata.csv',format_corrector=T)

# }

Run the code above in your browser using DataLab