View source: R/long_distance_df.R
long_distance_df | R Documentation |
long_distance_df
creates a long data frame of all the pairwise
distances from a sample distance matrix (e.g. the output of
phyloseq::distance()
) with all the metadata listed for
each sample. Allows for easy within- and among-group boxplots, or whatever
other comparisons are of interest.
long_distance_df(
dmat,
metadat,
idcol = "X.SampleID",
diag = FALSE,
suff = c("1", "2"),
distcol = "Distance",
baseline = NULL
)
dmat |
A distance matrix or other diagonal matrix object with sample names as row and column names. |
metadat |
A data frame or data frame-like object with the data set's metadata |
idcol |
( |
diag |
( |
suff |
( |
distcol |
( |
baseline |
( |
A data frame N(N-1)
(or N^2
if diag = TRUE
is set) rows (where N is the number of samples) with sample IDs, metadata,
and pairwise distances listed for each pair of samples. Sample ID and
metadata columns have '1' or '2' appended to them so the user can tell
which column belongs to which sample.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.