Skip to contents

Experimental Network Plots for Delta-Scale Pairwise (Partial) Correlations

Usage

delta_network(
  x,
  timediff = "2-1",
  partial = TRUE,
  corr_thresh = 0.75,
  interactive = TRUE,
  method = c("pearson", "kendall", "spearman")
)

Arguments

x

Input covariate array, with n rows, p columns, and t slices

timediff

Pair of time points to use in heatmap. Should be in format 't2-t1'

partial

If TRUE, partial correlations using the ppcor package will be used. If FALSE, correlations will be used

corr_thresh

Correlation value threshold for edge inclusion in the graph

interactive

If TRUE, an interactive visNetwork plot will open in the Viewer panel. If FALSE, a static igraph plot will be produced

method

A character string indicating which correlation coefficient is to be computed, with "pearson" as default

Value

Either an interactive visNetwork or static igraph plot

Examples

if (FALSE) {
delta_network(Xarray)
delta_network(Xarray, timediff = "4-2", corr_thresh = .9, method = "spearman")
}