| Title: | Build and Analyze Network of R Packages |
|---|---|
| Description: | Package DESCRIPTION files allows for specifying several types of inter-package relations. These include fields like Depends, Suggests, Enhances etc. This package allows for recovering graph structure based on these relations. Network representation of R repositories enables the user to explore the interconnected space of available R functionality while the developers or repository maintainers can quickly scan package forward and reverse dependencies. |
| Authors: | Michal Bojanowski [aut, cre] |
| Maintainer: | Michal Bojanowski <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.0-0 |
| Built: | 2026-06-05 10:15:10 UTC |
| Source: | https://github.com/mbojan/cranet |
Package DESCRIPTION files allows for specifying several types of
inter-package relations. These include fields like Depends, Suggests,
Enhances etc. This package and function pkgnet allows for
recovering graph structure based on these relations. Network representation
of R repositories enables the user to explore the interconnected space of
available R functionality while the developers or repository maintainers can
quickly scan package forward and reverse dependencies.
Author and maintainter: Michal Bojanowski
Snapshot of packages avaiable on CRAN on 2016-08-12
A 8938x17 matrix
returned by available.packages with the following column names:
“Package”, “Version”, “Priority”, “Depends”, “Imports”, “LinkingTo”, “Suggests”, “Enhances”, “License”, “License_is_FOSS”, “License_restricts_use”, “OS_type”, “Archs”, “MD5sum”, “NeedsCompilation”, “File”, “Repository”.
Fetched from http://cloud.r-project.org on August 12, 2016.
available.packages, crannet which is an igraph object
built from such matrix.
Snapshot of CRAN packages made on 2016-08-12
The network object is of class igraph. It is a directed network which
contains 9182 packages (vertices) and
47032 inter-package relations (edges). The
network, together with vertex and edge attributes is build from the matrix as
returned by available.packages, which in turn is based on
package DESCRIPTION files.
Available edge attributes: type
Available vertex attributes: name, Version, Priority, License, License_is_FOSS, License_restricts_use, OS_type, Archs, MD5sum, NeedsCompilation, File, Repository.
The network is a multi-graph, i.e. there may be multiple edges between a
given pair of nodes. This corresponds to the fact, that package X may, for
example, both depend and import package Y. To disentangle the types of
relations one can use edge attribute type which identifies a type of
inter-package relation. Possible values are of this attribute are:
Depends, Enhances, Imports, LinkingTo, Suggests.
They come from the respective columns in the matrix returned by
available.packages.
See available.packages for the description of the attributes
and types of inter-package relations.
Fetched from http://cran.at.r-project.org on August 12, 2016.
Given the matrix as returned by available.packages construct a graph,
of class igraph of inter-package relations.
pkgnet(object, ...) ## Default S3 method: pkgnet(object, ...) ## S3 method for class 'character' pkgnet(object, ap_args = NULL, ...) ## S3 method for class 'matrix' pkgnet(object, enams = c("Depends", "Suggests", "Imports", "Enhances", "LinkingTo"), vnams = c("Version", "Priority", "License", "License_is_FOSS", "License_restricts_use", "OS_type", "Archs", "MD5sum", "NeedsCompilation", "File", "Repository"), ...)pkgnet(object, ...) ## Default S3 method: pkgnet(object, ...) ## S3 method for class 'character' pkgnet(object, ap_args = NULL, ...) ## S3 method for class 'matrix' pkgnet(object, enams = c("Depends", "Suggests", "Imports", "Enhances", "LinkingTo"), vnams = c("Version", "Priority", "License", "License_is_FOSS", "License_restricts_use", "OS_type", "Archs", "MD5sum", "NeedsCompilation", "File", "Repository"), ...)
object |
a matrix as returned by |
... |
arguments passed to/from other methods |
ap_args |
|
enams |
character, names of columns of |
vnams |
character, names of columns of |
The resulting graph (object of class igraph) is a multigraph: there
can be multiple relationships between any given pair of vertices. Different
types of relations can be disentagled using edge attribute called
type. It stores the type of relation as provided with enams
argument.
Object of class igraph.
available.packages, graph.data.frame
## Not run: a <- available.packages(contrib.url("http://cran.r-project.org", "source")) g <- pkgnet(a) summary(g) ## End(Not run)## Not run: a <- available.packages(contrib.url("http://cran.r-project.org", "source")) g <- pkgnet(a) summary(g) ## End(Not run)