prune_nodes: Prune nodes based on given percentage

Description Usage Arguments See Also Examples

View source: R/prune_nodes.R

Description

Prune nodes based on given percentage

Usage

1
prune_nodes(p, percentage = 0.2, rank = c("amount", "in_degree", "out_degree"))

Arguments

p

process map object created by create_pmap_graph() function

percentage

how many percentage of the nodes should be pruned.

rank

how to rank the nodes. amount means ranking the nodes by amount column (default); in_degree means ranking the nodes by in_degree; out_degree means ranking the nodes by out_degree;

See Also

prune_edges

Examples

1
2
3
4
5
6
7
library(dplyr)
p <- generate_eventlog() %>% create_pmap(target_categories = c("target"))
DiagrammeR::count_nodes(p)
# [1] 10
p <- prune_nodes(p, percentage = 0.5)
DiagrammeR::count_nodes(p)
# [1] 5

pmap documentation built on March 18, 2018, 2:14 p.m.