melt_similarity: Melt a table into long form

Description Usage Arguments Author(s) Examples

View source: R/melt_similarity.R

Description

Transform a distance object or a similarity matrix to a long form dataframe

Usage

1
melt_similarity(dat, decreasing = NA)

Arguments

dat

An R disttance object or similarity matrix

decreasing

Whether to sort the result based on decreasing values of distance/similarity

Author(s)

Peter I-Fan Wu

Examples

1
2
3
4
5
6
mat=matrix(c(1,1,0,0,
             1,0,1,1,
             1,0,0,0
          ),nrow=3,byrow=T)
dist_=hamming_distance(mat)
melt_similarity(dist_,decreasing=T)

peterwu19881230/microbialPhenotypes documentation built on March 19, 2021, 6:36 a.m.