简体   繁体   中英

Loading Data Set using R h2o

I'm looking at Darren Cook's book and was trying to load the data set as follows.

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

To which I got the following error:

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

What am I doing wrong or how can I solve this?

The URL is wrong. Try this instead:

library(h2o)
h2o.init()

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM