PackageReporters: Package Reporters

PackageReportersR Documentation

Package Reporters

Description

pkgnet defines several package reporter R6 classes that analyze some particular aspect of a package. These reporters share common functionality and interfaces defined by a base reporter class AbstractPackageReporter.

Class Constructor

  • Initialize an instance of the reporter.

  • Returns:

    • Instantiated reporter object. Note that this reporter object isn't useful yet until you use the set_package method to set a package.

Public Methods

set_package(pkg_name, pkg_path = NULL)
  • Set the package that the reporter will analyze. This can only be done once for a given instance of a reporter. Instantiate a new copy of the reporter if you need to analyze a different package.

  • Args:

    • pkg_name: character string, name of package

    • pkg_path: character string, optional directory path to source code of the package. It is used for calculating test coverage. It can be an absolute or relative path.

  • Returns:

    • Self, invisibly.

get_summary_view()
  • Returns an htmlwidget object that summarizes the analysis of the reporter. Used when creating a package report.

  • Returns:

    • htmlwidget object

Public Fields

pkg_name

character string, name of set package. Read-only.

report_markdown_path

character string, path to R Markdown template for this reporter. Read-only.

Special Methods

clone(deep = FALSE)
  • Method for copying an object. See Advanced R for the intricacies of R6 reference semantics.

  • Args:

    • deep: logical. Whether to recursively clone nested R6 objects.

  • Returns:

    • Cloned object of this class.


UptakeOpenSource/pkgnet documentation built on April 20, 2024, 3:14 p.m.