STS_sortingcost: A cost computation function for Side-to-Side (STS) algorithm

Description Usage Arguments Value Examples

View source: R/SPIN.r

Description

A cost computation function for Side-to-Side (STS) algorithm

Usage

1
2
STS_sortingcost(expr = NULL, method = c("Euclidean", "Correlation",
  "eJaccard", "none"))

Arguments

expr

An expresssion matrix containing n-rows of cells and m-cols of genes.

method

A character string indicating the distance function.

Value

A numeric value of sorting cost.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
set.seed(15)
da <- iris[sample(150, 150, replace = FALSE), ]
d <- da[,1:4]
randomOrdering_cost <- STS_sortingcost(d, method= 'Euclidean')
randomOrdering_cost

da <- iris
d <- da[,1:4]
properOrdering_cost <- STS_sortingcost(d, method= 'Euclidean')
properOrdering_cost

uSORT documentation built on Nov. 8, 2020, 5:18 p.m.