h2o (version 3.2.0.3)

h2o.head: Return the Head or Tail of an H2O Dataset.

Description

Returns the first or last rows of an H2O parsed data object.

Usage

h2o.head(x, n = 6L, ...)

h2o.tail(x, n = 6L, ...)

## S3 method for class 'H2OFrame': head(x, n = 6L, ...)

## S3 method for class 'H2OFrame': tail(x, n = 6L, ...)

Arguments

x
An H2OFrame object.
n
(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.
...
Further arguments passed to or from other methods.

Value

  • A data frame containing the first or last n rows of an H2OFrame object.

Examples

Run this code
library(h2o)
localH2O <- h2o.init(ip = "localhost", port = 54321, startH2O = TRUE)
ausPath <- system.file("extdata", "australia.csv", package="h2o")
australia.hex <- h2o.uploadFile(localH2O, path = ausPath)
head(australia.hex, 10)
tail(australia.hex, 10)

Run the code above in your browser using DataLab