I have bunch of .csv.bz2
files, which i have to download, extract, and read in R.
I downloaded the file and want to extract it to current working directory, then read it.
unz(filename,filename.csv)
but it does not seem to work. How can I do that?
I heard somewhere that bzfiles can be read directly without decompressing. How can I do that?
bzfile()
is not necessary,read.csv()
can handle compressed files automatically. So it's justread.csv("file.csv.bz2")
. Here is an example (first section "Loading the Data"). – Kalat