PackageReport: R6 Class Representing an R Package Report

PackageReportR Documentation

R6 Class Representing an R Package Report

Description

pkgnet compiles one or more package reporters into a package report for a specified package. PackageReport is an R6 class that holds all of those reporters and has a method render_report() to generate an HTML report file. You can access each individual reporter and modify it using its methods if you wish.

The function CreatePackageReport() is a shortcut for both generating a PackageReport object with instantiated reporters and creating the HTML report in one call.

Value

Self, invisibly.

Active bindings

pkg_name

(character string) name of package. Read-only.

pkg_path

(character string) path to source code of the package. Read-only.

report_path

(character string) path and filename of output report.

SummaryReporter

Instantiated pkgnet SummaryReporter object

DependencyReporter

Instantiated pkgnet DependencyReporter object

FunctionReporter

Instantiated pkgnet FunctionReporter object

InheritanceReporter

Instantiated pkgnet InheritanceReporter object

Methods

Public methods


Method new()

Initialize an instance of a package report object.

Usage
PackageReport$new(
  pkg_name,
  pkg_path = NULL,
  report_path = tempfile(pattern = pkg_name, fileext = ".html")
)
Arguments
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.

report_path

(character string) The path and filename of the output report. Default report will be produced in the temporary directory.

Returns

Instantiated package report object.


Method add_reporter()

Add a reporter to the package report.

Usage
PackageReport$add_reporter(reporter)
Arguments
reporter

Instantiated package reporter object

Returns

Self, invisibly


Method render_report()

Render html pkgnet package report.

Usage
PackageReport$render_report()

Method clone()

The objects of this class are cloneable with this method.

Usage
PackageReport$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


pkgnet documentation built on June 22, 2024, 12:19 p.m.