Returns the first or last rows of an H2OFrame object.
h2o.head(x, n = 6L, ...)# S3 method for H2OFrame
head(x, n = 6L, ...)
h2o.tail(x, n = 6L, ...)
# S3 method for H2OFrame
tail(x, n = 6L, ...)
An H2OFrame object.
(Optional) A single integer. If positive, number of rows in x to return. If negative, all but the n first/last number of rows in x.
Ignored.
An H2OFrame containing the first or last n rows of an H2OFrame object.
# NOT RUN {
library(h2o)
h2o.init(ip <- "localhost", port = 54321, startH2O = TRUE)
australia_path <- system.file("extdata", "australia.csv", package = "h2o")
australia <- h2o.uploadFile(path = australia_path)
head(australia, 10)
tail(australia, 10)
# }
Run the code above in your browser using DataLab