chiDist2: Pairwise Chi-squared distances

Description Usage Arguments Value Author(s) Examples

View source: R/chiDist2.R

Description

Wrapper function chi2Dist imported from 'ExPosition' package. Computes the Chi-squared distances between all pairs of data point given

Usage

1

Arguments

A

A data matrix where each row is a different data point

Value

Returns an N x N matrix where N is the number of rows in X. element (i,j) is the squared Chi-squared distance between ith data point in X and jth data point in X.

Author(s)

Dr. Anna Goldenberg, Bo Wang, Aziz Mezlini, Feyyaz Demir

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Data1 is of size n x d_1, 
## where n is the number of patients, d_1 is the number of genes, 
## Data2 is of size n x d_2, 
## where n is the number of patients, d_2 is the number of methylation
data(Data1)
data(Data2)

## Calculate distance matrices(here we calculate Euclidean Distance, 
## you can use other distance, e.g. correlation)
Dist1 = chiDist2(as.matrix(Data1))
Dist2 = chiDist2(as.matrix(Data2))

SNFtool documentation built on June 11, 2021, 9:06 a.m.

Related to chiDist2 in SNFtool...