coerce: Convert an object to another class

Description Arguments Author(s) Examples

Description

Convert object between COBRAPerformance and COBRAPlot classes.

Arguments

from

The object that is to be coerced into another class.

Author(s)

Charlotte Soneson

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(cobradata_example)
cobraperf <- calculate_performance(cobradata_example,
                                   binary_truth = "status",
                                   aspects = "fdrtpr")
cobraplot <- prepare_data_for_plot(cobraperf)

## Coerce COBRAPerformance object into COBRAPlot object
as(cobraperf, "COBRAPlot")

## Coerce COBRAPlot object into COBRAPerformance object
as(cobraplot, "COBRAPerformance")

iCOBRA documentation built on April 17, 2021, 6:07 p.m.