Learn R Programming

cummeRbund (version 2.14.0)

makeprobs: Transform a matrix into probabilities by columns

Description

This function takes a matrix of expression values (must be greater than 0) and returns a matrix of probabilities by column. This is a required transformation for the Jensen-Shannon distance which is a metric that operates on probabilities.

Usage

makeprobs(a)

Arguments

a
A matrix of expression values (values must be greater than 0).

Value

A matrix of expression probabilities by column.

Details

To make a matrix of probabilities by row, use t() to transpose prior to calling makeprobs.

References

None

Examples

Run this code
myMat<-matrix(sample(1:50,50),10)
probs<-makeprobs(myMat)

Run the code above in your browser using DataLab