Visualizing an ordination in 3D with RGL

March 24, 2021 • PD Schloss • 1 min read

Output

Code

This is where we started before the episode

library(tidyverse)
library(readxl)

nmds <- read_tsv(file="raw_data/schubert.braycurtis.nmds_3d.axes")
metadata <- read_excel(path="raw_data/schubert.metadata.xlsx")
metadata_nmds <- inner_join(metadata, nmds, by=c('sample_id'='group')) %>%
  mutate(disease_stat = factor(disease_stat,
                               levels=c("DiarrhealControl",
                                        "Case",
                                        "NonDiarrhealControl")
                                )
)

Installations

comments powered by Disqus