RatioIntersect {similaRpeak} | R Documentation

## RatioIntersect class

### Description

An object which is a interface to calculate the ratio between the peaks values between two profiles.

The `RatioIntersect` object is needed to calculate the ratio of profiles intersection area between two profiles and those profiles total areas. A threshold and the two profiles are set during the `RatioIntersect` object creation. If different threshold or profiles are needed, the `calculateMetric` function should be used, with the new profiles and threshold passed as arguments to update those values inside the `RatioIntersect` object.

The threshold is the minimum total area value accepted to calculate a ratio.

### Usage

    RatioIntersect

### Format

An object of class `R6ClassGenerator` of length 24.

### Value

The `RatioIntersect$new` function returns a `RatioIntersect` object which contains the information about the two profiles and the threshold used to calculate the metric. It can be used, as many times needed, to calculate the specified metric.

### Constructor

Create a `RatioIntersect` object.

`RatioIntersect$new(profile1, profile2, threshold = 1)`

The threshold is the minimum total area value accepted to calculate a ratio.

The `RatioIntersect` object inherites those functions:

- `getMetric` A function that returns the value of the calculated metric

- `getInfo` A function that returns a description of the metric with the metric value.

- `getType` A function that returns the unique name associated to this metric

- `calculateMetric` A function that modifies the values of the two profiles and the threshold. The new values (profile1, profile2, threshold) are passed as arguments.

### Author(s)

Astrid Deschenes

### See Also

- `MetricFactory` for using a interface to calculate all available metrics separately or togheter.

[Package similaRpeak version 1.24.0 Index]