Package tech.tablesaw.aggregate
Class CrossTab
java.lang.Object
tech.tablesaw.aggregate.CrossTab
Utilities for creating frequency and proportion cross tabs
-
Method Summary
Modifier and TypeMethodDescriptionstatic Table
columnPercents
(Table table, String column1, String column2) Returns a table containing the column percents made from a source table, after first calculating the counts cross-tabulated from the given columnsstatic Table
columnPercents
(Table table, CategoricalColumn<?> column1, CategoricalColumn<?> column2) Returns a table containing the column percents made from a source table, after first calculating the counts cross-tabulated from the given columnsstatic Table
Returns a Table containing counts of records in the given Table grouped by the given columnName See alsoTable.countBy(String...)
static Table
counts
(Table table, CategoricalColumn<?> column1, CategoricalColumn<?> column2) Returns a table containing two-dimensional cross-tabulated counts for each combination of values incolumn1
andcolumn2
static Table
Returns a Table containing the proportion of records in the given Table grouped by the given column TODO: Consider renaming to proportionsstatic Table
rowPercents
(Table table, String column1, String column2) Returns a table containing the row percents made from a source table, after first calculating the counts cross-tabulated from the given columnsstatic Table
rowPercents
(Table table, CategoricalColumn<?> column1, CategoricalColumn<?> column2) Returns a table containing the row percents made from a source table, after first calculating the counts cross-tabulated from the given columnsstatic Table
tablePercents
(Table table, String column1, String column2) Returns a table containing the table percents made from a source table, after first calculating the counts cross-tabulated from the given columnsstatic Table
tablePercents
(Table table, CategoricalColumn<?> column1, CategoricalColumn<?> column2) Returns a table containing the table percents made from a source table, after first calculating the counts cross-tabulated from the given columns
-
Method Details
-
counts
Returns a table containing two-dimensional cross-tabulated counts for each combination of values incolumn1
andcolumn2
- Parameters:
table
- The table we're deriving the counts fromcolumn1
- A column intable
column2
- Another column intable
- Returns:
- A table containing the cross-tabs
-
counts
Returns a Table containing counts of records in the given Table grouped by the given columnName See alsoTable.countBy(String...)
-
percents
Returns a Table containing the proportion of records in the given Table grouped by the given column TODO: Consider renaming to proportions -
columnPercents
public static Table columnPercents(Table table, CategoricalColumn<?> column1, CategoricalColumn<?> column2) Returns a table containing the column percents made from a source table, after first calculating the counts cross-tabulated from the given columns -
columnPercents
Returns a table containing the column percents made from a source table, after first calculating the counts cross-tabulated from the given columns -
rowPercents
public static Table rowPercents(Table table, CategoricalColumn<?> column1, CategoricalColumn<?> column2) Returns a table containing the row percents made from a source table, after first calculating the counts cross-tabulated from the given columns -
rowPercents
Returns a table containing the row percents made from a source table, after first calculating the counts cross-tabulated from the given columns -
tablePercents
public static Table tablePercents(Table table, CategoricalColumn<?> column1, CategoricalColumn<?> column2) Returns a table containing the table percents made from a source table, after first calculating the counts cross-tabulated from the given columns -
tablePercents
Returns a table containing the table percents made from a source table, after first calculating the counts cross-tabulated from the given columns
-