pathDistances {PathwaySpace} | R Documentation |
Calculate a pathway space distance between two vectors.
Description
Calculate a pathway space distance between two vectors.
Usage
pathDistances(gdist, from, to, nperm = 1000, verbose = TRUE)
Arguments
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 |
Value
A list with pathway space distances and a 'ggplot' object.
See Also
Examples
# 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"
[Package PathwaySpace version 1.0.1 Index]