as.vector.H2OFrame: Convert an H2OFrame to a vector

View source: R/frame.R

as.vector.H2OFrameR Documentation

Convert an H2OFrame to a vector

Description

Convert an H2OFrame to a vector

Usage

## S3 method for class 'H2OFrame'
as.vector(x,mode)

Arguments

x

An H2OFrame object

mode

Mode to coerce vector to

Examples

## Not run: 
library(h2o)
h2o.init()
iris_hf <- as.h2o(iris)
cor_R <- cor(as.matrix(iris[, 1]))
cor_h2o <- cor(iris_hf[, 1])
iris_R_cor <- cor(iris[, 1:4])
iris_H2O_cor <- as.data.frame(cor(iris_hf[, 1:4]))
h2o_vec <- as.vector(unlist(iris_H2O_cor))
r_vec <- as.vector(unlist(iris_R_cor))

## End(Not run)

h2o documentation built on Sept. 23, 2022, 5:06 p.m.