is.gzip: Check if a file is a gzip file

Description Usage Arguments Value Examples

View source: R/gziputils.r

Description

Check if a file is a gzip file

Usage

1

Arguments

f

Path to file to test

Value

logical indicating whether f is in gzip format (or NA if the file cannot be accessed)

Examples

1
2
3
4
5
6
7
8
notgzipfile=tempfile()
writeLines('not a gzip', notgzipfile)
is.gzip(notgzipfile)
con=gzfile(gzipfile<-tempfile(),open='wt')
writeLines('This one is gzipped', con)
close(con)
is.gzip(gzipfile)
unlink(c(notgzipfile,gzipfile))

nat.utils documentation built on May 19, 2017, 9:05 a.m.

Search within the nat.utils package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.