voting_matrix: Matrix construction, used to rank packages

Description Usage Arguments Value Examples

View source: R/voting_matrix.R

Description

This function creates the voting matrix from your packages and the package graph.

Usage

1
2
voting_matrix(G, my_packs = row.names(utils::installed.packages()),
  kind.of = "to_packages")

Arguments

G

The package graph, as an igraph object. Usually the Suggests graph.

my_packs

The packages that you are interested to use as reference. Default is your installed packages

kind.of

The direction of the relations. If you want packages recommending my_packs, it should be "to_packages", and if you want packages recommended by my_packs, it should be "from_packages". It can also be "all".

Value

A list with packages and scores for each one.

Examples

1
2
3
gs = my_network()[['Suggests']]
pack = my_packages()[1]
X = voting_matrix(gs,my_packs=pack)

arielolafsalgado/packexplorer documentation built on Aug. 22, 2021, 8:55 a.m.