kb_pair: Get Author-Package Network For Two Named Authors

Description Usage Arguments Value Examples

View source: R/fetch_and_prep.R

Description

Finds one of the possible shortest paths between two named authors from CRAN. This is possible by searching the tidygraph object of all CRAN's package-author relationships created with kevinbacran::kb_combos(). Outputs a tidygraph object that's a subset of the full CRAN tidygraph. This output contains only the named authors and the authors and packages that link them together.

Usage

1
kb_pair(tidy_graph, name_a, name_b = "Hadley Wickham")

Arguments

tidy_graph

A tidygraph object of CRAN authors/packages created with kb_combos()

name_a

A character string of a CRAN author's name (one of two)

name_b

A character string of a CRAN author's name (two of two)

Value

A tidygraph object with classes 'tbl_graph' and 'igraph'.

Examples

1
2
3
4
5
## Not run: 
pair_graph <- kb_pair(cran_graph, "Garrett Grolemund", "Yihui Xie")
print(pair_graph)

## End(Not run)

matt-dray/kevinbacran documentation built on Dec. 15, 2019, 12:37 a.m.