Prepare statistical data for plotting with gglyph::geom_glyph().
Usage
process_data_statistical(
data,
from = "from",
to = "to",
group = NULL,
sig = "sig",
thresh = 0.05
)
Arguments
- data
A DataFrame or tibble containing the input data to be processed.
- from
A string indicating the column name for the start nodes.
- to
A string indicating the column name for the end nodes.
- group
A string indicating the column name for the grouping variable.
- sig
A string indicating the column name for the significance level.
- thresh
A single number indicating the significance threshold. Default is 0.05.
Examples
data(pisa_2022)
# For non-grouped data
processed_data <- process_data_statistical(
data = pisa_2022,
from = "from",
to = "to",
sig = "sig",
thresh = 0.05
)
# For grouped data
processed_data <- process_data_statistical(
data = pisa_2022,
from = "from",
to = "to",
sig = "sig",
group = "group",
thresh = 0.05
)