pathDistances | R Documentation |
Calculate a pathway space distance between two vectors
pathDistances(gdist, from, to, nperm = 1000, verbose = TRUE)
gdist |
A distance matrix computed by the igraph's |
from |
A vector with valid vertex names. |
to |
A vector with valid vertex names. |
nperm |
Number of permutations. |
verbose |
A single logical value specifying to display detailed
messages (when |
A list with pathway space distances and a 'ggplot' object.
plotPathwaySpace
# Load a vertex-wise distance matrix (distance between nodes in a graph)
data("gdist.toy", package = "PathwaySpace")
# Get two vertex lists
from <- sample(colnames(gdist.toy), 50)
to <- sample(colnames(gdist.toy), 50)
# Calculate distances between lists, and between random lists
res <- pathDistances(gdist.toy, from, to)
names(res)
# "p_dist" "z_score"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.