Description Usage Arguments Value Examples

Compute correlations between pairs of features given in idxi and idxj

1 2 3 4 5 6 7 8 | ```
corSubsetPairs(
Y,
idxi,
idxj,
method = c("pearson", "spearman"),
silent = FALSE,
setNANtoZero = FALSE
)
``` |

`Y` |
matrix where rows are features |

`idxi` |
indecies |

`idxj` |
indecies |

`method` |
specify which correlation method: "pearson" or "spearman" |

`silent` |
suppress messages |

`setNANtoZero` |
replace NAN correlation values with a zero |

Compute local correlations between for all k: cor(Y[,idxi[k]], Y[,idxj[k]])

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
# Simulate simple dataset
N = 600
Y = matrix(rnorm(N*100), 100, N)
# select pairs to compute correlations between
i1 = sample.int(N, 200, replace=TRUE)
i2 = sample.int(N, 200, replace=TRUE)
# evaluate all piars
C = corSubsetPairs(t(Y), i1,i2)
# show value
C[i1[10], i2[10]]
# show values from evaluating this pair directly
cor(Y[,i1[10]], Y[,i2[10]])
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.