is.null
as verification of the presence of a particular
data component. Unlike the component-specific accessors (e.g. otu_table
,
or phy_tree
),
the default behavior is not to stop with an error if the desired slot is empty.
In all cases this is controlled by the errorIfNULL
argument, which can
be set to TRUE
if an error is desired.access(physeq, slot, errorIfNULL=FALSE)
phyloseq-class
.NULL
)? Default FALSE
.slot
.
Returns NULL if slot does not exist. Returns physeq
as-is
if it is a component class that already matches the slot name.getslots.phyloseq
, merge_phyloseq
#
## data(GlobalPatterns)
## access(GlobalPatterns, "tax_table")
## access(GlobalPatterns, "phy_tree")
## access(otu_table(GlobalPatterns), "otu_table")
## # Should return NULL:
## access(otu_table(GlobalPatterns), "sample_data")
## access(otuTree(GlobalPatterns), "sample_data")
## access(otuSam(GlobalPatterns), "phy_tree")
Run the code above in your browser using DataLab