From fee1acdbbdedbf07fd7750a7da770afa2761ec3d Mon Sep 17 00:00:00 2001 From: TuomasBorman Date: Sat, 30 Nov 2024 14:08:59 +0200 Subject: [PATCH] up --- inst/pages/wrangling.qmd | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/inst/pages/wrangling.qmd b/inst/pages/wrangling.qmd index 0639de57..f8196b13 100644 --- a/inst/pages/wrangling.qmd +++ b/inst/pages/wrangling.qmd @@ -165,9 +165,27 @@ library(knitr) # Melt SE object molten_tse <- meltSE( tse, + assay.type = "counts", add.row = TRUE, add.col = TRUE, - assay.type = "counts") + ) molten_tse |> head() |> kable() ``` + +For `MultiAssayExperiment` data, you can utilize instead `longFormat()`. + +```{r} +#| label: melt-mae-data + +data(HintikkaXOData) +mae <- HintikkaXOData + +molten_mae <- longFormat( + mae, + i = c("counts", "nmr", "signals"), + colDataCols = c("Rat", "Diet") + ) + +molten_mae |> head() |> kable() +```