Learn R Programming

h2o (version 2.8.4.4)

head: Return the First or Last Part of a H2O Dataset

Description

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

Usage

## S3 method for class 'H2OParsedData':
head(x, n = 6L, \dots)
## S3 method for class 'H2OParsedData':
tail(x, n = 6L, \dots)

Arguments

x
An H2O parsed data 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.
...
Arguments to be passed to or from other methods. (Currently unimplemented).

Value

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

Examples

Run this code
library(h2o)
localH2O = h2o.init()
ausPath = system.file("extdata", "australia.csv", package="h2o")
australia.hex = h2o.importFile(localH2O, path = ausPath)
head(australia.hex, 10)
tail(australia.hex, 10)

Run the code above in your browser using DataLab