plot.summary_cranly_network: Top-n package or author barplots according to a range of...

View source: R/plot_summary.R

plot.summary_cranly_networkR Documentation

Top-n package or author barplots according to a range of network statistics

Description

Top-n package or author barplots according to a range of network statistics

Usage

## S3 method for class 'summary_cranly_network'
plot(x, top = 20, according_to = NULL, scale = FALSE, ...)

Arguments

x

a summary_cranly_network object.

top

integer. How may top packages or authors should be plotted? Default is 20.

according_to

the statistic according to which the top-top list is produced. See summary.cranly_network for available statistics.

scale

logical. Should the statistics be scaled to lie between 0 and 1 before plotting? Default is FALSE.

...

currently not used

Examples



cran_db <- clean_CRAN_db()
package_network <- build_network(cran_db)

package_summaries <- summary(package_network)
plot(package_summaries, according_to = "n_imported_by", top = 30)
plot(package_summaries, according_to = "n_depended_by", top = 30)
plot(package_summaries, according_to = "page_rank", top = 30)

## author network
author_network <- build_network(cran_db, perspective = "author")
author_summaries <- summary(author_network)
plot(author_summaries, according_to = "n_collaborators", top = 30)
plot(author_summaries, according_to = "n_packages", top = 30)
plot(author_summaries, according_to = "page_rank", top = 30)



ikosmidis/cranly documentation built on Aug. 30, 2022, 7:55 p.m.