Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
加载级别/类别过多的数据时出错h2o.importFile()_R_H2o - Fatal编程技术网

加载级别/类别过多的数据时出错h2o.importFile()

加载级别/类别过多的数据时出错h2o.importFile(),r,h2o,R,H2o,我正在尝试使用R中的h2o.importfile导入一个大的.csv文件 library(h2o) h2o.init() dataFile <- "big_file.csv" h2o.importFile(dataFile,header=TRUE,destination_frame = "data.hex") 该文件有许多id列。我收到以下错误消息 错误:water.parser.ParseDataset$H2OParseException:超出了列[id1,id2]的分类限制。考虑将

我正在尝试使用R中的h2o.importfile导入一个大的.csv文件

library(h2o)
h2o.init()
dataFile <- "big_file.csv" 
h2o.importFile(dataFile,header=TRUE,destination_frame = "data.hex")
该文件有许多id列。我收到以下错误消息

错误:water.parser.ParseDataset$H2OParseException:超出了列[id1,id2]的分类限制。考虑将这些列作为字符串重新解析。

有没有办法将这些列类型指定为类似于data.framestringAsFactors=FALSE的字符串?在h2o.importFile函数中指定col.types参数应该对您有用

write.csv(iris, "iris.csv")
hf0 <- h2o.importFile("iris.csv", col.types = c("int","real","real","real","real","string"))
unlist(h2o.getTypes(hf0))
[1] "int"    "real"   "real"   "real"   "real"   "string"