convert compressed file(s) to connection(s)

Description

convert compressed file(s) to a list of connection(s)

Usage

1
zip2con ( path , ... )

Arguments

path

either directory, file, list of directories, list of files, vector of directories or vector of files

...

arguments passed to file handling function bzfile; if path is (list/vector of) directory/ies, arguments 'all.files', 'recursive', and 'ignore.case' can be passed to list.files that is used to get all compressed files from directory

Details

function converts file(s) to connections by calling the appropriate uncompress function depending on file extension; currently supported are files with extensions "bz2" that are processed by bzfile

Value

returns list of connection(s); names of list are file names (full path) without compression extension; if path is already a connection it is returned as named list if path is not processable NULL is returned, or (when multiple files are processed) it is not appended to return list

Author(s)

Martin Hecht

Examples

1
2
3
4
5
6
7
8
## Not run: 
fl <- file.path( .Library , "eat/extdata/ConQuest.Log.Example1.log.bz2" )
zip2con ( fl )
zip2con ( bzfile ( fl ) )
zip2con ( list ( fl , fl ) )
zip2con ( c ( fl , fl ) )

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.