extractor-functions | R Documentation |

Find packages, authors, maintainers, license, versions etc by authors, packages or names matching a specific string

## S3 method for class 'cranly_network' package_by(x, author = NULL, exact = FALSE, flat = TRUE) ## S3 method for class 'cranly_network' package_with(x, name = NULL, exact = FALSE, flat = TRUE) ## S3 method for class 'cranly_network' author_of(x, package = NULL, exact = FALSE, flat = TRUE) ## S3 method for class 'cranly_network' author_with(x, name = NULL, exact = FALSE, flat = TRUE) ## S3 method for class 'cranly_network' suggested_by(x, package = NULL, exact = FALSE, flat = TRUE) ## S3 method for class 'cranly_network' suggesting(x, package = NULL, exact = FALSE, flat = TRUE) ## S3 method for class 'cranly_network' imported_by(x, package = NULL, exact = FALSE, flat = TRUE) ## S3 method for class 'cranly_network' importing(x, package = NULL, exact = FALSE, flat = TRUE) ## S3 method for class 'cranly_network' dependency_of(x, package = NULL, exact = FALSE, flat = TRUE) ## S3 method for class 'cranly_network' depending_on(x, package = NULL, exact = FALSE, flat = TRUE) ## S3 method for class 'cranly_network' linked_by(x, package = NULL, exact = FALSE, flat = TRUE) ## S3 method for class 'cranly_network' linking_to(x, package = NULL, exact = FALSE, flat = TRUE) ## S3 method for class 'cranly_network' enhanced_by(x, package = NULL, exact = FALSE, flat = TRUE) ## S3 method for class 'cranly_network' enhancing(x, package = NULL, exact = FALSE, flat = TRUE) ## S3 method for class 'cranly_network' maintainer_of(x, package = NULL, exact = FALSE, flat = TRUE) ## S3 method for class 'cranly_network' maintained_by(x, author = NULL, exact = FALSE, flat = TRUE) ## S3 method for class 'cranly_network' email_of(x, author = NULL, exact = FALSE, flat = TRUE) ## S3 method for class 'cranly_network' email_with(x, name = NULL, exact = FALSE, flat = TRUE) ## S3 method for class 'cranly_network' description_of(x, package = NULL, exact = FALSE, flat = TRUE) ## S3 method for class 'cranly_network' title_of(x, package = NULL, exact = FALSE, flat = TRUE) ## S3 method for class 'cranly_network' license_of(x, package = NULL, exact = FALSE, flat = TRUE) ## S3 method for class 'cranly_network' version_of(x, package = NULL, exact = FALSE, flat = TRUE) ## S3 method for class 'cranly_network' release_date_of(x, package = NULL, exact = FALSE, flat = TRUE) packages_by(x, author, exact, flat) packages_with(x, name = NULL, exact = FALSE, flat = TRUE) authors_with(x, name = NULL, exact = FALSE, flat = TRUE) authors_of(x, package = NULL, exact = FALSE, flat = TRUE) emails_of(x, author = NULL, exact = FALSE, flat = TRUE) emails_with(x, name = NULL, exact = FALSE, flat = TRUE) descriptions_of(x, package = NULL, exact = FALSE, flat = TRUE) titles_of(x, package = NULL, exact = FALSE, flat = TRUE) licenses_of(x, package = NULL, exact = FALSE, flat = TRUE) release_dates_of(x, package = NULL, exact = FALSE, flat = TRUE) versions_of(x, package = NULL, exact = FALSE, flat = TRUE)

`x` |
a |

`author` |
a vector of character strings with the author names to be matched. If |

`exact` |
logical. Should we use exact matching? Default is |

`flat` |
if |

`name` |
a vector of character strings with the names to be matched. If |

`package` |
a vector of character strings with the package names to be matched. If |

The extractor functions all try to figure out what `y`

is in the statement

`y`

is (the) `extractor-function`

a `package`

/`author`

.

For example, for

"

`y`

is the package by`"Kurt Hornik"`

" we do`package_by(x, "Kurt Hornik")`

"

`y`

is the author of a package with a name matching`"MASS"`

" we do`author_of(x, "MASS")`

"

`y`

is the package enhanced by the`"prediction"`

package we do`enhanced_by(x, "prediction", exact = TRUE)`

"

`y`

is the package linking to`"Rcpp"`

we do`linking_to(x, "Rcpp", exact = TRUE)`

If `flat = TRUE`

then the result of the extraction function is a
`data.frame`

, which is the subset of `x$nodes`

matching `author`

,
`name`

or `package`

(according to the value of `exact`

). If `flat = FALSE`

then the results is a vector.

When `flat = TRUE`

any `NA`

s are removed before the result is
returned.

`build_network.cranly_db()`

`subset.cranly_network()`

`plot.cranly_network()`

# Using a package directives network cran_db <- clean_CRAN_db() package_network <- build_network(cran_db) ## Find all packages containing glm in their name package_with(package_network, name = "glm") ## Find all authors of packages containing brglm in their name author_of(package_network, package = "rglm", exact = FALSE) ## Find all packages with brglm in their name package_with(package_network, name = "rglm", exact = FALSE) ## Find all authors of the package brglm2 author_of(package_network, package = "brglm2", exact = TRUE) ## Find all authors with Ioannis in their name author_with(package_network, name = "Ioannis", exact = FALSE) ## Find all packages suggested by Rcpp suggested_by(package_network, package = "Rcpp", exact = TRUE) ## Find all packages imported by Rcpp imported_by(package_network, package = "Rcpp", exact = TRUE) ## Find all packages enhacing brglm enhancing(package_network, package = "brglm", exact = TRUE) ## Find all packages linking to RcppArmadillo linking_to(package_network, package = "RcppArmadillo", exact = TRUE) ## Find the release date of RcppArmadillo release_date_of(package_network, package = "RcppArmadillo", exact = TRUE) ## Find the release data of all packages with "brglm" in their name release_date_of(package_network, package = "brglm", exact = FALSE) ## More information about packages with "brglm" in their name release_date_of(package_network, package = "brglm", exact = FALSE, flat = FALSE)[c("package", "version")] ## Using an author collaboration network author_network <- build_network(cran_db, perspective = "author") ## Find all packages containing glm in their name package_with(author_network, name = "glm") ## Find all authors of packages containing brglm in their name author_of(author_network, package = "rglm", exact = FALSE) ## Find all packages with brglm in their name package_with(author_network, name = "rglm", exact = FALSE) ## Find all authors of the package brglm2 author_of(author_network, package = "brglm2", exact = TRUE) ## Find all authors with Ioannis in their name author_with(author_network, name = "Ioannis", exact = FALSE)

cranly documentation built on Aug. 27, 2022, 1:07 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.