Description Usage Arguments Examples
This function returns certain information about the dependency structure of the package/s to be analyzed in the form of vectors, lists and data.frames. The different aspects of the dependency structure are provided by 11 different output types (set by the parameter 'outtypes', see description below). The default assumption is that there is an R package in the current working directory and that the dependencies to be analyzed are given in the DESCRIPTION file. Use the parameters <e2><80><98>githublink<e2><80><99> and/or 'pkg' to alter the package/s to be analyzed.
1 2 |
githublink |
A link to a github repository of an R package. |
pkg |
Character vector of CRAN package name/s you want to see the dependencies of. In the case that githublink is also set, the github package is considered as the root package and the packages provided by the pkg parameter are considered to be first level packages, e.g. on the same level as the packages in the DESCRIPTION file of the github package. This is to help answer the question "How would the dependency structure change if the package on github would also depend on a few more packages (provided by the pkg parameter)?". |
outtype |
Possible output types: Key data about the dependency structure:
Dependencies per first level dependency:
For plotting and network analysis:
|
includebasepkgs |
Whether to include base packages in the analysis or not. |
recursive |
If TRUE, the outputs go no deeper than level 3. The default of FALSE is probably the desired output in most cases. |
1 2 3 4 5 6 7 8 9 10 11 12 13 | # Using a package in the local working directory
# setwd("path/to/package")
# dstr_data(outtype = c("all", "tree"))
# Using a package on github
network_object <- dstr_data(githublink= "tidyverse/ggplot2", pkg="dplyr",
recursive = TRUE, includebasepkgs = FALSE, outtype = "network")
# needs package igraph attached:
# plot(network_object, edge.arrow.size = .1, edge.color="darkgrey",vertex.size = 10,
# vertex.shape = "circle",vertex.frame.color = "white", vertex.label.font= 1,
# vertex.label.color = "black", vertex.color = "white",edge.width = 1.5,
# layout = layout_with_fr)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.