h2o (version 3.10.5.2)

h2o.merge: Merge Two H2O Data Frames

Description

Merges two H2OFrame objects with the same arguments and meanings as merge() in base R.

Usage

h2o.merge(x, y, by = intersect(names(x), names(y)), by.x = by, by.y = by,
  all = FALSE, all.x = all, all.y = all, method = "hash")

Arguments

x,y

H2OFrame objects

by

columns used for merging by default the common names

by.x

x columns used for merging by name or number

by.y

y columns used for merging by name or number

all

TRUE includes all rows in x and all rows in y even if there is no match to the other

all.x

If all.x is true, all rows in the x will be included, even if there is no matching row in y, and vice-versa for all.y.

all.y

see all.x

method

auto, radix, or hash (default)

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 DataCamp Workspace