i2p {oligoClasses} | R Documentation

## Functions to convert probabilities to integers, or integers to probabilities.

### Description

Probabilities estimated in the `crlmm` package are often stored as integers to save memory. We provide a few utility functions to go back and forth between the probability and integer representations.

### Usage

    i2p(i)
    p2i(p)

### Arguments

`i` | A matrix or vector of integers.
`p` | A matrix or vector of probabilities.

### Value

The value returned by `i2p` is

1 - exp(-i/1000)

The value returned by `2pi` is

as.integer(-1000*log(1-p))

### See Also

`confs`

### Examples

    	i2p(693)
    	p2i(0.5)
    	i2p(p2i(0.5))

[Package oligoClasses version 1.46.0 Index]