Learn R Programming

h2o (version 3.0.0.22)

as.matrix.h2o: Converts H2O Data to an R Matrix

Description

Convert an H2OFrame object to a matrix, which allows subsequent data frame operations within the R environment.

Usage

## S3 method for class 'H2OFrame':
as.matrix(x, ...)

Arguments

x
An H2OFrame object
...
Additional arguments to be passed to or from

Value

  • Returns a matrix in the R enviornment.

See Also

as.matrix for the base R implementation.

Examples

Run this code
library(h2o)
localH2O <- h2o.init()
prosPath <- system.file("extdata", "prostate.csv", package="h2o")
prostate.hex <- h2o.uploadFile(localH2O, path = prosPath)
prostate.matrix <- as.matrix(prostate.hex)
summary(prostate.matrix)
head(prostate.matrix)

Run the code above in your browser using DataLab