使用R h2o加载数据集

时间:2018-11-07 04:10:55

标签: r h2o

我正在看达伦·库克(Darren Cook)的书,并试图按以下方式加载数据集。

library(h2o)
library(tidyverse)
h2o.init()
mydata<-"https:/raw.githubusercontent.com/DarrenCook/h2o//bk/data sets/"
mydata<-h2o.importFile(paste0(mydata,"iris_wheader.csv"))

我收到以下错误:

Error in .h2o.doSafeREST(h2oRestApiVersion = h2oRestApiVersion, urlSuffix = page,  : 


ERROR MESSAGE:

Illegal character in path at index 60: https://raw.githubusercontent.com//DarrenCook//h2o//bk//data sets//iris_wheader.csv

我在做什么错或如何解决?

1 个答案:

答案 0 :(得分:0)

URL错误。尝试以下方法:

library(h2o)
h2o.init()

mydata <- h2o.importFile("https://raw.githubusercontent.com/DarrenCook/h2o/bk/datasets/iris_wheader.csv")