join-phyloseq | R Documentation |
These functions are wrappers around dplyr joining operations (see
dplyr::mutate-joins
) whose first (x
) argument is either the taxonomy
table or sample data.
left_join_tax_table(x, ...)
## S4 method for signature 'phyloseq'
left_join_tax_table(x, ...)
## S4 method for signature 'taxonomyTable'
left_join_tax_table(x, ...)
left_join_sample_data(x, ...)
## S4 method for signature 'phyloseq'
left_join_sample_data(x, ...)
## S4 method for signature 'sample_data'
left_join_sample_data(x, ...)
inner_join_tax_table(x, ...)
## S4 method for signature 'phyloseq'
inner_join_tax_table(x, ...)
## S4 method for signature 'taxonomyTable'
inner_join_tax_table(x, ...)
inner_join_sample_data(x, ...)
## S4 method for signature 'phyloseq'
inner_join_sample_data(x, ...)
## S4 method for signature 'sample_data'
inner_join_sample_data(x, ...)
x |
A |
... |
Arguments passed to respective dplyr joining operation |
When joining by taxonomy table, the .otu column name can be used to match taxa names. When joining by sample data, the .sample column name can be used to match sample names.
An object of the same type as x
, with added columns
dplyr::left_join()
dplyr::inner_join()
library(tibble)
data(GlobalPatterns)
GlobalPatterns %>% sample_variables
ps1 <- GlobalPatterns %>%
select_sample_data(!contains("Barcode"))
y <- GlobalPatterns %>%
sample_data %>%
select_sample_data(contains("Barcode")) %>%
as_tibble
ps2 <- ps1 %>% left_join_sample_data(y, by = ".sample")
ps2 %>% sample_variables
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.