bookmark

Revolutions: R tip: Save time and space by compressing data files


Description

R user John Christie points out a handy feature introduced in R 2.10: you can now read directly from a text file compressed using gzip or other file-compression tools. He notes: R added transparent decompression for certain kinds of compressed files in the latest version (2.10). If you have your files compressed with bzip2, xvz, or gzip they can be read into R as if they are plain text files. You should have the proper filename extensions. The command... myData <- read.table('myFile.gz') #gzip compressed files have a "gz" extension Will work just as if 'myFile.gz' were the raw text file....

Preview

Tags

Users

  • @vivion

Comments and Reviews