/** * Remove the first row from the data set, and use it as the column titles. * Use loadTable("table.csv", "header") instead. */ @Deprecated public String[] removeTitleRow() { String[] titles = getStringRow(0); removeRow(0); setColumnTitles(titles); return titles; }
/** * Remove the first row from the data set, and use it as the column titles. * Use loadTable("table.csv", "header") instead. */ @Deprecated public String[] removeTitleRow() { String[] titles = getStringRow(0); removeRow(0); setColumnTitles(titles); return titles; }
typeCol = dictionary.getColumnIndex("type", true); setColumnTitles(dictionary.getStringColumn(titleCol)); final String[] typeNames = dictionary.getStringColumn(typeCol);
typeCol = dictionary.getColumnIndex("type", true); setColumnTitles(dictionary.getStringColumn(titleCol)); final String[] typeNames = dictionary.getStringColumn(typeCol);
setColumnTitles(tsv ? PApplet.split(line, '\t') : splitLineCSV(line)); header = false; } else {
setColumnTitles(tsv ? PApplet.split(line, '\t') : splitLineCSV(line, reader)); header = false; } else {
protected Table createSubset(int[] rowSubset) { Table newbie = new Table(); newbie.setColumnTitles(columnTitles); // also sets columns.length newbie.columnTypes = columnTypes; newbie.setRowCount(rowSubset.length); for (int i = 0; i < rowSubset.length; i++) { int row = rowSubset[i]; for (int col = 0; col < columns.length; col++) { switch (columnTypes[col]) { case STRING: newbie.setString(i, col, getString(row, col)); break; case INT: newbie.setInt(i, col, getInt(row, col)); break; case LONG: newbie.setLong(i, col, getLong(row, col)); break; case FLOAT: newbie.setFloat(i, col, getFloat(row, col)); break; case DOUBLE: newbie.setDouble(i, col, getDouble(row, col)); break; } } } return newbie; }
protected Table createSubset(int[] rowSubset) { Table newbie = new Table(); newbie.setColumnTitles(columnTitles); // also sets columns.length newbie.columnTypes = columnTypes; newbie.setRowCount(rowSubset.length); for (int i = 0; i < rowSubset.length; i++) { int row = rowSubset[i]; for (int col = 0; col < columns.length; col++) { switch (columnTypes[col]) { case STRING: newbie.setString(i, col, getString(row, col)); break; case INT: newbie.setInt(i, col, getInt(row, col)); break; case LONG: newbie.setLong(i, col, getLong(row, col)); break; case FLOAT: newbie.setFloat(i, col, getFloat(row, col)); break; case DOUBLE: newbie.setDouble(i, col, getDouble(row, col)); break; } } } return newbie; }
if (row == 0) { setColumnTypes(incoming.getColumnTypes()); setColumnTitles(incoming.getColumnTitles());