table.aggregate
Rows grouped by the values of some columns and summarised, as dplyr's group_by and summarise: a row per group (the groups in the order of their values), its columns n (the rows in the group) and, for every column summarised and statistic, column_statistic (area_sum, area_mean). Missing values are left out of the statistics; sd is the sample's (n - 1, as R's sd). Without columns to group by, the whole table is one group.
| Input | Type | What it is |
tablerequired | table | the table |
| Output | Type | What it is |
table | table | a row per group |
| Setting | Type | What it is |
by | any | the columns to group by: a name, names separated by commas or a list (none: one group) |
columns | any | the columns summarised (default: every other) |
stats | any | the statistics: sum, mean, count, min, max, sd, median (default sum) |
table.calc
A column computed row by row from an expression over the others, as a spreadsheet's field calculator or dplyr's mutate: the expressions of map algebra (area / 10000, cells if class == 1 else 0), the node's other inputs as numbers by their names. A column of the same name is replaced, else it is added at the end.
| Input | Type | What it is |
tablerequired | table | the table |
| Output | Type | What it is |
table | table | the table with the column |
| Setting | Type | What it is |
columnrequired | text | the column's name |
expressionrequired | text | its value at every row, e.g. area / 10000 |
table.filter
The rows of a table where an expression is true, as dplyr's filter: the columns by their names, the expressions of map algebra (class == 3 and area > 10; isnull(x) for a missing value), the node's other inputs as numbers by their names. A row where the expression is missing is left out.
| Input | Type | What it is |
tablerequired | table | the table |
| Output | Type | What it is |
table | table | its rows where the expression is true |
| Setting | Type | What it is |
expressionrequired | text | what a row kept is, e.g. class == 3 and area > 10 |
table.join
Two tables joined by key columns, as dplyr's joins: every row of the left with each row of the right of the same key (left: the left's rows without one kept, the right's columns missing; inner: only the rows of keys in both; full: the right's rows without one added too). The right's other columns follow the left's; one of a name the left has takes a suffix.
| Input | Type | What it is |
leftrequired | table | the left table |
rightrequired | table | the right table |
| Output | Type | What it is |
table | table | the tables joined |
| Setting | Type | What it is |
onrequired | any | the key columns, of the same names in both: a name, names separated by commas or a list |
right_on | any | the right's key columns, when they are named otherwise (as many as on) |
how | text | left, inner or full (default left) |
suffix | text | added to a right's column of a name the left has (default _right) |
table.of
A table written in the settings: its columns' names and its rows of numbers (null: no value), such as the small tables a planning problem takes.
| Output | Type | What it is |
table | table | the table |
| Setting | Type | What it is |
columnsrequired | any | the columns' names |
rowsrequired | any | the rows: [[number, ...], ...], as many numbers as columns |
table.pivot
A table from long to wide or back, as tidyr's pivot_wider and pivot_longer. Wider: a row per value of the id columns, a column per value of the names column (named prefix and the value: to_1, to_2...) holding the values column (transitions from, to, cells into a matrix). Longer: the columns given (or every column but the id ones) into rows of two columns, the names and the values; a table's values being numbers, the name of a column is the number in it (2011 of y2011 with prefix y; 1 of to_1), else its place among them (1, 2...).
| Input | Type | What it is |
tablerequired | table | the table |
| Output | Type | What it is |
table | table | the table pivoted |
| Setting | Type | What it is |
directionrequired | text | wider or longer |
id | any | the columns that make a row (wider), or kept as they are (longer) |
names | text | wider: the column whose values become columns |
values | text | wider: the column whose values fill them |
prefix | text | the new columns' names before the value (wider), or before the number in the names (longer) (default: the names column's name and _) |
fill | number | wider: the value of a combination absent (default none) |
columns | any | longer: the columns turned into rows (default every one but the id ones) |
names_to | text | longer: the column of the names (default name) |
values_to | text | longer: the column of the values (default value) |
table.read
A table from a file: comma-separated values (.csv), tab-separated (.tsv, .txt), with ; as Excel writes them where a comma marks the decimals (the separator and the decimal mark found by themselves), or JSON (.json, a list of rows). A header names the columns; an empty value, or NA, is none. The columns of text (names, not numbers) are left out: a table is of numbers.
| Output | Type | What it is |
table | table | the table |
| Setting | Type | What it is |
pathrequired | text | the file, relative to the model's folder |
separator | text | between the values: , ; or tab (default: found) |
decimal | text | the decimal mark: . or , (default: found) |
table.select
Columns of a table chosen (in the order given), left out, or renamed, as dplyr's select and rename.
| Input | Type | What it is |
tablerequired | table | the table |
| Output | Type | What it is |
table | table | its columns chosen |
| Setting | Type | What it is |
columns | any | the columns kept, in this order (default every one) |
drop | any | the columns left out |
rename | any | new names: { old = "new", ... } |
table.sort
The rows of a table sorted by some columns (the first, then the next where it ties; missing values last), as dplyr's arrange, and the first rows kept (top: the ten largest patches, say).
| Input | Type | What it is |
tablerequired | table | the table |
| Output | Type | What it is |
table | table | its rows sorted |
| Setting | Type | What it is |
byrequired | any | the columns to sort by: a name, names separated by commas or a list |
descending | bool | from the largest (default false) |
top | integer | the first rows kept (default every row) |
table.write
Write a table to a file, its format by the extension: comma-separated values (.csv, the default), tab-separated (.tsv, .txt) or JSON (.json, a list of rows); a value missing is left empty (null in JSON). For a spreadsheet that reads a comma as the decimal mark: separator ; and decimal ,.
| Input | Type | What it is |
tablerequired | table | the table |
| Output | Type | What it is |
path | text | the file written |
| Setting | Type | What it is |
pathrequired | text | the file, relative to the model's folder |
separator | text | between the values: , ; or tab (default by the extension) |
decimal | text | the decimal mark: . (default) or , |