calculateDistance {mia} | R Documentation |
vegan
Will be removed by Bioc 3.15
calculateDistance(x, FUN = stats::dist, ...) ## S4 method for signature 'ANY' calculateDistance(x, FUN = stats::dist, ...) ## S4 method for signature 'SummarizedExperiment' calculateDistance( x, FUN = stats::dist, exprs_values = "counts", transposed = FALSE, ... )
x |
a
|
FUN |
a |
... |
other arguments passed onto |
exprs_values |
a single |
transposed |
Logical scalar, is x transposed with cells in rows? |
calculateDistance
calculates a distance matrix between samples. The
type of distance calculated can be modified by setting FUN
, which
expects a function with a matrix input as its first argument.
a sample-by-sample distance matrix, suitable for NMDS, etc.
# generate some example data mat <- matrix(1:60, nrow = 6) df <- DataFrame(n = c(1:6)) se <- SummarizedExperiment(assays = list(counts = mat), rowData = df) ## Not run: calculateDistance(se) ## End(Not run)