Skip to contents

Plot the Comparison of Two TNA Models or Matrices

Usage

# S3 method for class 'tna_comparison'
plot(
  x,
  type = "heatmap",
  population = "difference",
  method = "pearson",
  name_x = "x",
  name_y = "y",
  ...
)

Arguments

x

A tna_comparison object.

type

A character string naming the type of plot to produce. The available options are "heatmap" (the default), "scatterplot", "centrality_heatmap", and "weight_density".

population

A "character" string naming the population for which to produce the heatmaps, i.e, one of "x", "y", or "difference" for the differences. Ignored for type = "scatterplot". Defaults to "diff".

method

A character string naming the correlation coefficient to use when plotting a scatterplot. The available options are "pearson" (the default), "kendall", "spearman", and "distance". The final option is the distance correlation coefficient of Szekely, Rizzo, and Bakirov (2007). See also the energy package for further information on this measure.

name_x

An optional character string to use as the name of the first population in the plots. The default is "x".

name_y

An optional character string to use as the name of the second population in the plots. The default is "y".

...

Ignored.

Value

A ggplot object.

References

Szekely, G.J., Rizzo, M.L., and Bakirov, N.K. (2007), Measuring and Testing Dependence by Correlation of Distances, Annals of Statistics, Vol. 35 No. 6, pp. 2769-2794. doi:10.1214/009053607000000505

See also

Examples

model_x <- tna(group_regulation[1:200, ])
model_y <- tna(group_regulation[1001:1200, ])
comp <- compare(model_x, model_y)
plot(comp)