R Reading in a zip data file without unzipping it

后端 未结 7 2251
青春惊慌失措
青春惊慌失措 2020-12-04 15:22

I have a very large zip file and i am trying to read it into R without unzipping it like so:

temp <- tempfile(\"Sales\", fileext=c(\"zip\"))
data <- re         


        
7条回答
  •  时光说笑
    2020-12-04 15:49

    If you have zcat installed on your system (which is the case for linux, macos, and cygwin) you could also use:

    zipfile<-"test.zip"
    myData <- read.delim(pipe(paste("zcat", zipfile)))
    

    This solution also has the advantage that no temporary files are created.

提交回复
热议问题