FR test is a multivariate generalization of nonparametric two-sample test. This function is an implementation with customized options, including a visualization of the minimum spanning tree (MST).
FR.test(
samp1,
samp2,
use.cosine = FALSE,
binary = FALSE,
binary.cutoff = 2,
plot.MST = FALSE,
col = c("#F0E442", "#56B4E9"),
label.names = c("Sample 1", "Sample 2"),
vertex.size = 5,
edge.width = 1,
...
)
Test statistics and p-values.
Total number of subtrees.
Number of subtrees of Sample 1.
Number of subtrees of Sample 2.
The standardized FR statistic.
P-value of the FR test.
Numeric matrix or data frame for Sample 1. Rows are multivariate dimensions, and columns are samples. E.g. gene by cell.
Numeric matrix or data frame for Sample 2.
An option if to use cosine distance. Logical variable. By default (FALSE
),
Euclidean distance is used.
An option if to use binary values. Logical variable. Default: FALSE
. If TRUE
,
use binary.cutoff
to dichotomize samp1
and samp2
.
Numeric value for binary cutoff. Binary value = 1 if greater than binary.cutoff
, 0 otherwise. Default: 2
.
Boolean variable indicating if to plot the minimum spanning tree (MST). Default: FALSE
.
Character vector of length two for customized colors of the nodes in MST. Default: c("#F0E442", "#56B4E9")
.
Character vector of length two for customized names of the two samples. Default: c("Sample 1","Sample 2")
.
Additional plotting parammeters passed to plot.igraph
. Default: vertex.size=5, edge.width=1
.