Convert Links to List of Links and Nodes
Arguments
- links
list with elements source
and target
Value
list with elements links
(input list links
with new
elements value
, source
, target
) and nodes
(data frame with column name
)
Examples
kwb.package:::toLinksAndNodes(list(
source = c("s1", "s1"), target = c("t1", "t2")
))
#> $links
#> $links$source
#> [1] 0 0
#>
#> $links$target
#> [1] 1 2
#>
#> $links$value
#> [1] 1
#>
#>
#> $nodes
#> name
#> 1 s1
#> 2 t1
#> 3 t2
#>