Append multiple H2O frames rowwise and columnwise

Syntax

Append data in multiple H2O frames rowwise

    _h2oframe _rbind framenamelist [, into(newframename)]

Append data in multiple H2O frames columnwise

    _h2oframe _cbind framenamelist [, into(newframename)]

Description

_h2oframe _rbind appends the rows from multiple H2O frames into one H2O frame. The number of columns and column types in all frames must be the same.

_h2oframe _cbind appends the columns from multiple H2O frames into one H2O frame. The number of observations in all frames must be the same.

Option

into(newframename) specifies the destination H2O frame that stores the combined data. If into() is not specified, all the subsequent data will be appended to the first H2O frame in the list.

Examples

 Setup
     . sysuse auto, clear
     . keep if foreign==0
     . _h2oframe _put, into(domestic)
     . sysuse auto, clear
     . keep if foreign==1
     . _h2oframe _put, into(foreign)

 Combine the rows of the existing H2O frames domestic and foreign to create the new
 H2O frame called auto
     . _h2oframe _rbind domestic foreign, into(auto1)

 List the results
     . _h2oframe _change auto1
     . _h2oframe _list

 Append the rows in the H2O frame foreign to the end of H2O frame domestic
     . _h2oframe _rbind domestic foreign

 List the results
     . _h2oframe _change domestic
     . _h2oframe _list

 -----------------------------------------------------------------------------------
 Setup
     . sysuse auto, clear
     . keep make
     . _h2oframe _put, into(auto_make)
     . sysuse auto, clear
     . drop make
     . _h2oframe _put, into(auto_nomake)

 Combine the columns of the H2O frames auto_make and auto_nomake, storing the
 combined data in the new H2O frame auto2
     . _h2oframe _cbind auto_make auto_nomake, into(auto2)

 List the results
     . _h2oframe _change auto2
     . _h2oframe _list

 Append the columns of H2O frame auto_nomake to the right of H2O frame auto_make
 columnwise
     . _h2oframe _cbind auto_make auto_nomake

 List the results
     . _h2oframe _change auto_make
     . _h2oframe _list