Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ascribe

R-CMD-check Codecov test coverage

ascribe scans R projects for package and function use. Other packages can use the results to generate citations without maintaining their own parser.

Installation

You can install the development version of ascribe from GitHub with:

# install.packages("pak")
pak::pak("VisruthSK/ascribe")

Example

Build a package universe, then cite the code that uses it:

library(ascribe)

universe <- build_universe_data("stats")
usage <- scan_usage(path, universe$packages, universe$export_index, universe$origin_map)
cite_usage(usage)

Limitations

  • The scanner records function calls, not function references. It ignores lapply(x, mean) and purrr::map(x, sd).
  • Its built-in Markdown parser recognizes R chunks headed with {r}. Plain fenced blocks with an r info string are skipped.
  • Package attachments are tracked within each file. A setup script that calls library() does not establish attachment state for another file.
  • Default package citations require the package to be installed. Supply package_citations for packages that are unavailable locally.
  • Scanning a namespace inspects its bindings for R6 classes. Active bindings can run their getters, and unusually deep generated expressions can exceed R's recursion limits.

About

❗ This is a read-only mirror of the CRAN R package repository. ascribe — Static Detection and Citation of R Package and Function Usage. Homepage: https://ascribe.visruth.com Report bugs for this package: https://github.com/VisruthSK/ascribe/issues

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages