Description Usage Arguments Details Value Author(s) Examples
View source: R/three_mode_pca.R
Three Mode Principal Components, an ordination method that can take into account repeated measure of subjects. These methods have also been extended to other common ecological distance metrics for Three Mode Principal Coordinate Analysis
1 2 3 4 5 6 7 8 9 10 11 12 13 |
micro_set |
A tidy_micro data set |
table |
OTU table of interest |
group |
A categorical variable to color by |
time_var |
The time point variable column name in your tidi_MIBI set |
subject |
The subject variable column name in your tidi_MIBI set |
y |
Value to calculate principle components or coordinates on. Default is centered log ratio (recommended) |
plot_scores |
Plot the scores instead of the principle components |
main |
Plot title |
subtitle |
Plot subtitle |
legend_title |
Plot legend title |
scalewt |
Logical; center and scale OTU table, recommended |
Requires that you have columns for subject name and time point. Data must be complete across time points. The function will filter out inconsistent subjects
If n_compA, n_compB, and n_compC aren't specified they will default to the number of complete subjects, the number of taxa, and the number of time points, respectively. This slows down performance slightly, but will not change the results.
A ggplot you can add geoms to if you'd like
Charlie Carpenter, Kayla Williamson
1 2 3 4 5 6 7 | data(bpd_phy); data(bpd_cla); data(bpd_ord); data(bpd_fam); data(bpd_clin)
otu_tabs = list(Phylum = bpd_phy, Class = bpd_cla,
Order = bpd_ord, Family = bpd_fam)
set <- tidy_micro(otu_tabs = otu_tabs, clinical = bpd_clin)
set %>% three_mode(table = "Family", group = bpd1, time_var = day, subject = study_id)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.