0

Using readtext package in R I got an error

setwd("MYDIR")

library(readtext)

zip_data = readtext("myfile.zip", text_field = "mytext_field")

I got this error : Error in sort_fields(result, path, text_field) : There is no field called "mytext_field" in file ~~~~(dir)

I directly checked the csv file in the zip file, there is

"mytext_field" in the csv file

what should i do?

I googled but have no luck

이훈석
  • 45
  • 5

1 Answers1

0

You must specify .csv in your text_field

zip_data = readtext("myfile.zip", text_field = "mytext_field.csv")
Basti
  • 1,703
  • 3
  • 10
  • 25
  • Then I would try an other strategy as already explained here ; https://stackoverflow.com/questions/12460938/r-reading-in-a-zip-data-file-without-unzipping-it – Basti Mar 17 '21 at 11:09