knitr::opts_chunk$set( collapse = TRUE, comment = "#>", warning = FALSE, message = TRUE, out.width = "100%" )
library(massdataset) library(tidyverse) library(massstat) data("liver_aging_pos") liver_aging_pos
library(massdataset) library(tidyverse) data("expression_data") data("sample_info") data("sample_info_note") data("variable_info") data("variable_info_note") object = create_mass_dataset( expression_data = expression_data, sample_info = sample_info, variable_info = variable_info, sample_info_note = sample_info_note, variable_info_note = variable_info_note ) object x = object %>% log(2) %>% scale() variable_distance <- dist_mass_dataset(x = x, margin = "variable") head(as.matrix(variable_distance)[, 1:5]) sample_distance <- dist_mass_dataset(x = x, margin = "sample") head(as.matrix(sample_distance)[, 1:5])
plot(hclust(d = sample_distance))
library(massdataset) library(tidyverse) data("liver_aging_pos") x = liver_aging_pos %>% `+`(1) %>% log(2) %>% scale() variable_cor <- cor_mass_dataset(x = x[1:100,], margin = "variable") head(as.matrix(variable_cor)[, 1:5]) sample_cor <- cor_mass_dataset(x = x, margin = "sample") head(as.matrix(sample_cor)[, 1:5])
library(corrplot) corrplot(sample_cor)
sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.