使用R解压缩gz文件 [英] Decompress gz file using R
本文介绍了使用R解压缩gz文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我过去曾经使用?unzip
来使用R获取压缩文件的内容.这一次,我很难从.gz文件中提取文件,该文件可以找到
I have used ?unzip
in the past to get at contents of a zipped file using R. This time around, I am having a hard time extracting the files from a .gz file which can be found here.
我尝试了?gzfile
和?gzcon
,但无法使其正常工作.您能提供的任何帮助将不胜感激.
I have tried ?gzfile
and ?gzcon
but have not been able to get it to work. Any help you can provide will be greatly appreciated.
推荐答案
如果您确实要解压缩文件,只需使用支持 gzip 的untar
函数.
例如:
If you really want to uncompress the file, just use the untar
function which does support gzip.
E.g.:
untar('chadwick-0.5.3.tar.gz')
这篇关于使用R解压缩gz文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文