Extract bz2 file in R

前端 未结 5 917
我在风中等你
我在风中等你 2020-12-04 21:39

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

5条回答
  •  借酒劲吻你
    2020-12-04 22:10

    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}.

提交回复
热议问题