A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://insightsengineering.github.io/teal.data/latest-tag/reference/join_key.html below:

Create a relationship between a pair of datasets — join_key • teal.data

Create a relationship between two datasets, dataset_1 and dataset_2. By default, this function establishes a directed relationship with dataset_1 as the parent. If dataset_2 is not specified, the function creates a primary key for dataset_1.

Usage
join_key(dataset_1, dataset_2 = dataset_1, keys, directed = TRUE)
Arguments
dataset_1, dataset_2

(character(1)) Dataset names. When dataset_2 is omitted, a primary key for dataset_1 is created.

keys

(optionally named character) Column mapping between the datasets, where names(keys) maps columns in dataset_1 corresponding to columns of dataset_2 given by the elements of keys.

directed

(logical(1)) Flag that indicates whether it should create a parent-child relationship between the datasets.

Value

object of class join_key_set to be passed into join_keys function.

Examples
join_key("d1", "d2", c("A"))
#> $d1
#> $d1$d2
#>   A 
#> "A" 
#> 
#> 
#> attr(,"class")
#> [1] "join_key_set"
#> attr(,"parents")
#> attr(,"parents")$d2
#> [1] "d1"
#> 
join_key("d1", "d2", c("A" = "B"))
#> $d1
#> $d1$d2
#>   A 
#> "B" 
#> 
#> 
#> attr(,"class")
#> [1] "join_key_set"
#> attr(,"parents")
#> attr(,"parents")$d2
#> [1] "d1"
#> 
join_key("d1", "d2", c("A" = "B", "C"))
#> $d1
#> $d1$d2
#>   A   C 
#> "B" "C" 
#> 
#> 
#> attr(,"class")
#> [1] "join_key_set"
#> attr(,"parents")
#> attr(,"parents")$d2
#> [1] "d1"
#> 


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4