library(h2o)
localH2O = h2o.init()
prosPath = system.file("extdata", "prostate.csv", package="h2o")
prostate.hex = h2o.importFile(localH2O, path = prosPath, key = "prostate.hex")
# Find ID of the 10 youngest patients in data
indices = h2o.order(data = prostate.hex$AGE, n = 10, decreasing = TRUE)
indices.R = as.matrix(indices)
youngest_patients = prostate.hex[indices.R]
Run the code above in your browser using DataLab