Learn R Programming

DiscreteTests (version 0.2.0)

DiscreteTestResultsSummary: Discrete Test Results Summary Class

Description

This is the class used by DiscreteTests for summarising DiscreteTestResults objects. It contains the summarised objects itself, as well as a summary data frame as private members. Both can be read by public methods.

Arguments

Methods


Method new()

Creates a new summary.DiscreteTestResults object.

Usage

DiscreteTestResultsSummary$new(test_results)

Arguments

test_results

the DiscreteTestResults class object to be summarised.


Method get_test_results()

Returns the underlying DiscreteTestResults object.

Usage

DiscreteTestResultsSummary$get_test_results()

Returns

A DiscreteTestResults R6 class object.


Method get_summary_table()

Returns the summary table of the underlying DiscreteTestResults object.

Usage

DiscreteTestResultsSummary$get_summary_table()

Returns

A data frame.


Method print()

Prints the summary.

Usage

DiscreteTestResultsSummary$print(...)

Arguments

...

further arguments passed to print.data.frame.

Returns

Prints a summary table of the tested null hypotheses. The object itself is invisibly returned.


Method clone()

The objects of this class are cloneable with this method.

Usage

DiscreteTestResultsSummary$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

Run this code
# binomial tests
obj <- binom.test.pv(0:5, 5, 0.5)
# create DiscreteTestResultsSummary object
res <- DiscreteTestResultsSummary$new(obj)
# print summary
print(res)
# extract summary table
res$get_summary_table()

Run the code above in your browser using DataLab