This function is used internally by many accessors and in
many functions/methods that need to access a particular type of component data.
If something is wrong, or the slot is missing, the expected behavior is that
this function will return NULL. Thus, the output can be tested by
is.null as verification of the presence of a particular
data component. Unlike the component-specific accessors (e.g.
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)
(Required). A character string indicating the slot (not data class) of the component data type that is desired.
(Optional). Logical. Should the accessor stop with
an error if the slot is empty (
Returns the component object specified by the argument
Returns NULL if slot does not exist. Returns
if it is a component class that already matches the slot name.
# ## 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.