Learn R Programming

reader (version 1.0.6)

classify.ext: Classify file types readable by standard R I/O functions.

Description

Look for known file extensions and classify as binary, comma-separated, text format, or OTH=other; other files are assumed to be unreadable. To read other files, need to specify more types manually.

Usage

classify.ext(ext = NULL, more.txt = NULL, more.bin = NULL, more.csv = NULL, print.all = FALSE)

Arguments

ext
filenames or extensions to classify
more.txt
more extensions that should be treated as txt
more.bin
more extensions that should be treated as binary
more.csv
more extensions that should be treated as csv
print.all
setting to T, simply prints the list of supported ext

Value

returns the 4 way classification for each file/extension

See Also

get.delim

Examples

Run this code
classify.ext(c("test.txt","*.csv","tot","other","rda","test.RDatA"))

Run the code above in your browser using DataLab