h2o (version 3.2.0.3)

h2o.merge: Merge Two H2O Data Frames

Description

Merges two H2OFrame objects by shared column names. Unlike the base R implementation, h2o.merge only supports merging through shared column names.

Usage

h2o.merge(x, y, all.x = FALSE, all.y = FALSE)

Arguments

x,y
H2OFrame objects
all.x
a logical value indicating whether or not shared values are preserved or ignored in x.
all.y
a logical value indicating whether or not shared values are preserved or ignored in y.

Details

In order for h2o.merge to work in multinode clusters, one of the datasets must be small enough to exist in every node. Currently, this function only supports all.x = TRUE. All other permutations will fail.

Examples

Run this code
h2o.init()
left <- data.frame(fruit = c('apple', 'orange', 'banana', 'lemon', 'strawberry', 'blueberry'),
color = c('red', 'orange', 'yellow', 'yellow', 'red', 'blue'))
right <- data.frame(fruit = c('apple', 'orange', 'banana', 'lemon', 'strawberry', 'watermelon'),
citrus = c(FALSE, TRUE, FALSE, TRUE, FALSE, FALSE))
l.hex <- as.h2o(left)
r.hex <- as.h2o(right)
left.hex <- h2o.merge(l.hex, r.hex, all.x = TRUE)

Run the code above in your browser using DataLab