as_xmap_tbl {xmap} | R Documentation |
Coercing data frames of links to crossmap tibbles
Description
This method takes a data.frame-like object and converts it into an 'xmap_tbl' based on specified columns for 'from', 'to', and 'weight'.
Usage
as_xmap_tbl(x, ...)
## S3 method for class 'data.frame'
as_xmap_tbl(x, from, to, weight_by, ..., tol = .Machine$double.eps^0.5)
diagnose_as_xmap_tbl(
x,
from,
to,
weight_by,
...,
tol = .Machine$double.eps^0.5
)
Arguments
x |
A data.frame or tibble to be converted in a crossmap tibble. |
... |
(reserved) Additional arguments passed to methods. |
from |
The column in ‘x' that specifies the ’from' nodes. |
to |
The column in ‘x' that specifies the ’to' nodes. |
weight_by |
The column in 'x' that specifies the weight of the links. |
tol |
Tolerance of comparison. |
Value
Returns an xmap tibble object.
Examples
demo$abc_links |>
as_xmap_tbl(from = lower, to = upper, weight_by = share)
[Package xmap version 0.1.0 Index]