Convert an edge list to record identifiers.

make_ids(x_pos, y_pos, id_length = max(x_pos, y_pos))

Arguments

x_pos

[integer]. Index of first half of a record-pair.

y_pos

[integer]. Index of second half of a record-pair.

id_length

Length of the record identifier.

Value

list

Details

Record groups from non-recursive links have the lowest record ID (sn) in the set as their group ID.

Examples

make_ids(x_pos = rep(7, 7), y_pos = 1:7)
#> $sn
#> [1] 1 2 3 4 5 6 7
#> 
#> $linked
#> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE
#> 
#> $group_id
#> [1] 1 1 1 1 1 1 1
#> 
make_ids(x_pos = c(1, 6), y_pos = 6:7)
#> $sn
#> [1] 1 2 3 4 5 6 7
#> 
#> $linked
#> [1]  TRUE FALSE FALSE FALSE FALSE  TRUE  TRUE
#> 
#> $group_id
#> [1] 1 2 3 4 5 1 1
#> 
make_ids(x_pos = 1:5, y_pos = c(1, 1, 2, 3, 4))
#> $sn
#> [1] 1 2 3 4 5
#> 
#> $linked
#> [1] TRUE TRUE TRUE TRUE TRUE
#> 
#> $group_id
#> [1] 1 1 1 1 1
#>