我正在尝试使用以下方法读取大的gz文件:
df= read.delim2(gzfile('route/file.gz', 'r'), sep = '|', header = TRUE, , stringsAsFactor = FALSE , encoding = 'UTF-8' , check.names = F )
我收到以下错误:
Error in gzfile("route/file.gz", :
cannot open the connection
In addition: Warning messages:
1: 'sparkR.init' is deprecated.
Use 'sparkR.session' instead.
See help("Deprecated")
2: 'sparkRSQL.init' is deprecated.
Use 'sparkR.session' instead.
See help("Deprecated")
3: 'sparkR.init' is deprecated.
Use 'sparkR.session' instead.
See help("Deprecated")
4: 'sparkRSQL.init' is deprecated.
Use 'sparkR.session' instead.
See help("Deprecated")
5: In gzfile("route/file.gz", :
cannot open compressed file 'route/file.gz', probable reason 'Bad address'
为什么会这样?以及如何解决?
我正在使用SparkR
PD:我使用的路由和文件名正确