Skip to content

Commit

Permalink
Edited template so R example runnable
Browse files Browse the repository at this point in the history
  • Loading branch information
anqif committed Aug 14, 2013
1 parent 6365f5b commit 5fcb4e0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions R/h2o-package.template
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,10 @@ Maintainer: Anqi Fu <[email protected]>
\examples{
library(h2o)
localH2O = new("H2OClient", ip = "localhost", port = 54321)
prostate.hex = h2o.importURL(localH2O, path = "https://raw.github.com/0xdata/h2o/master/smalldata/
logreg/prostate.csv", key = "prostate.hex")
h2o.checkClient(localH2O)
prostate.hex = h2o.importURL(localH2O, path = "https://raw.github.com/0xdata/h2o/master/smalldata/logreg/prostate.csv", key = "prostate.hex")
summary(prostate.hex)
prostate.glm = h2o.glm(y = "CAPSULE", x = c("AGE","RACE","PSA","DCAPS"), data = prostate.hex,
family = "binomial", nfolds = 10, alpha = 0.5)
prostate.glm = h2o.glm(y = "CAPSULE", x = c("AGE","RACE","PSA","DCAPS"), data = prostate.hex, family = "binomial", nfolds = 10, alpha = 0.5)
print(prostate.glm)
h2o.kmeans(data = prostate.hex, centers = 5)
}

0 comments on commit 5fcb4e0

Please sign in to comment.