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, the
.csv.bz2
Basically, you need to type:
library(R.utils) bunzip2("dataset.csv.bz2", "dataset.csv", remove = FALSE, skip = TRUE) dataset <- read.csv("dataset.csv")
See documentation here: bunzip2 {R.utils}.