public static Frame frame(String[] names, double[]... rows) {
    assert names == null || names.length == rows[0].length;
    Futures fs = new Futures();
    Vec[] vecs = new Vec[rows[0].length];
    Key keys[] = Vec.VectorGroup.VG_LEN1.addVecs(vecs.length);
    for( int c = 0; c < vecs.length; c++ ) {
      AppendableVec vec = new AppendableVec(keys[c]);
      NewChunk chunk = new NewChunk(vec, 0);
      for( int r = 0; r < rows.length; r++ )
        chunk.addNum(rows[r][c]);
      chunk.close(0, fs);
      vecs[c] = vec.close(fs);
    }
    fs.blockForPending();
    return new Frame(names, vecs);
  }
public static Frame frame ( String [ ] names , double [ ] ... rows ) { assert names == null || names . length == rows [ 0 ] . length ; Futures fs = new Futures ( ) ; Vec [ ] vecs = new Vec [ rows [ 0 ] . length ] ; Key keys [ ] = Vec . VectorGroup . VG_LEN1 . addVecs ( vecs . length ) ; for ( int c = 0 ; c < vecs . length ; c ++ ) { AppendableVec vec = new AppendableVec ( keys [ c ] ) ; NewChunk chunk = new NewChunk ( vec , 0 ) ; for ( int r = 0 ; r < rows . length ; r ++ ) chunk . addNum ( rows [ r ] [ c ] ) ; chunk . close ( 0 , fs ) ; vecs [ c ] = vec . close ( fs ) ; } fs . blockForPending ( ) ; return new Frame ( names , vecs ) ; }
Create a new frame based on given row data.
@param names  names of frame columns
@param rows  data given in the form of rows
@return new frame which contains columns named according given names and including given data