You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: vignettes/join-keys.Rmd
+23-3Lines changed: 23 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -53,8 +53,8 @@ As the _Constructor_ it is used to specify a collection of multiple individual k
53
53
Specifies a primary key or a relationship between two datasets.
54
54
55
55
-`dataset_1`, `dataset_2`: names of the datasets (if `dataset_2` is the same as `dataset_1` or is omitted, it creates a primary key);
56
-
-`key` (optional): named vector of column names;
57
-
-`parent` (optional): indicates which dataset (`"dataset_1"` or `"dataset_2"`) is the parent in a _parent-child_ relationship, or `"none"` for an undirected relationship.
56
+
-`key`: named character vector of column name mapping between datasets (unnamed vector assumes column names between datasets are the same);
57
+
-`directed` (optional): flag that indicates whether there is a _parent-child_directed relationship between `dataset_2` to `dataset_1` (latter as a parent).
58
58
59
59
Note that join keys are assumed to be symmetric, i.e., `join_key("ds1", "ds2", c("ds1_col" = "ds2_col"))` establishes a relationship from "x" to "y" and vice versa.
60
60
@@ -132,7 +132,7 @@ When only 1 argument is used this operator will return a `join_keys` object that
The consolidation of multiple _joining keys_ is achieved using the `c()` generic function, which generates a symmetric and valid `join_keys` object. When encountering identical relationship pairs, this operation retains the last occurrence of the pair within the specified argument order.
156
+
157
+
For added convenience, the function also accommodates `join_key_set` objects created through the `join_key` function. These objects can be provided as the initial argument or in any other position as needed.
# Merges join_key and join_key_set objects (from join_key function)
170
+
c(jk1, join_key("ds3", "ds3", "col_3"))
171
+
```
172
+
153
173
## Join Keys Relationships
154
174
155
175
There are 2 types of relationships encoded with _joining keys_ that are described in the following sections. The _primary_ and _foreign_ keys are created explicitly using the constructor for individual keys (`join_key`).
0 commit comments