mkStochastic: mkStochastic ensures that it is a stochastic vector, matrix...

Description Usage Arguments Details Value

View source: R/mkStochastic.R

Description

mkStochastic ensures that it is a stochastic vector, matrix or array.

Usage

1

Arguments

M

A vector, matrix or array to transform.

Details

mkStochastic ensures that the giving argument is a stochastic vector, matrix or array, i.e., that the sum over the last dimension is 1.

Value

A vector, matrix or array for which the sum over the last dimension is 1.


fchamroukhi/HMMR_r documentation built on Aug. 8, 2019, 2:38 p.m.