| hoeffDValues {MatrixQCvis} | R Documentation |
The function creates and returns Hoeffding's D statistics values from MA values.
hoeffDValues(tbl, name = "raw")
tbl |
'tibble', as obtained from the function 'MAvalues' |
name |
'character', name of the returned list |
The function uses the function 'hoeffd' from the 'Hmisc' package to calculate the values.
named list with Hoeffding's D values per sample
## create se
a <- matrix(1:100, nrow = 10, ncol = 10,
dimnames = list(1:10, paste("sample", 1:10)))
a[c(1, 5, 8), 1:5] <- NA
set.seed(1)
a <- a + rnorm(100)
cD <- data.frame(name = colnames(a), type = c(rep("1", 5), rep("2", 5)))
rD <- data.frame(spectra = rownames(a))
se <- SummarizedExperiment::SummarizedExperiment(assay = a,
rowData = rD, colData = cD)
tbl <- MAvalues(se)
hoeffDValues(tbl, "raw")
## normalized values
se_n <- se
assay(se_n) <- normalizeAssay(a, "sum")
tbl_n <- MAvalues(se_n, group = "all")
hoeffDValues(tbl_n, "normalized")
## transformed values
se_t <- se
assay(se_t) <- transformAssay(a, "log2")
tbl_t <- MAvalues(se_t, group = "all")
hoeffDValues(tbl_t, "transformed")