JSdistFromP: Jensen-Shannon distance on rows from a pre-defined vector of...

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/tools.R

Description

JSdist takes a matrix of expression probabilites (calculated directly or output from makeprobs()) and returns a matrix of Jensen-Shannon distances between individual rows and a specific vector of probabilities (q)

Usage

1

Arguments

mat

A matrix of expression probabilities (e.g. from makeprobs())

q

A vector of expression probabilities.

Details

Returns Jensen-Shannon distance for each row of a matrix of probabilities against a provided probability distribution (q)

Value

A vector of JS distances

Note

None

Author(s)

Loyal A. Goff

References

None

Examples

1
2
3
4
mat<-matrix(sample(1:50,50),10)
q<-c(100,4,72,8,19)
q<-q/sum(q)
js.distance<-JSdistFromP(mat,q)

shiauck/cummeRbund_on_RSQLite2.0 documentation built on May 5, 2019, 12:33 p.m.