Description Usage Arguments Value Examples
This function modifies @commdf@counts
slot of
(epd.entity.df-class
objects to filter taxa columns
to match taxa
. The function adds empty columns (NA
) if a new taxa is
defined in taxa
or removes columns for the taxa not included in taxa
.
The function may look useless for a single entity but it is useful when standardizing
data across multiple entities.
1 2 3 4 5 6 7 8 9 | filter_taxa(x, taxa, epd.taxonomy, na_value = 0)
## S4 method for signature 'epd.entity.df,character,data.frame'
filter_taxa(x, taxa,
epd.taxonomy, na_value = 0)
## S4 method for signature 'epd.entity,character,data.frame'
filter_taxa(x, taxa, epd.taxonomy,
na_value = 0)
|
x |
epd.entity |
taxa |
character Character vector indicating the new
taxa in the |
epd.taxonomy |
data.frame Data frame with the taxonomy from the
EPD as from the |
na_value |
numeric Number indicating the value to be used for taxa not previously present in the entity. |
epd.entity.df-class
object with the modified
@commdf@counts
slot.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
epd.connection <- connect_to_epd(host="localhost", database="epd",
user="epdr", password="epdrpw")
epd.1 <- get_entity(1, epd.connection)
epd.1@commdf@taxanames
colnames(epd.1@commdf@counts)
epd.1.ft <- filter_taxa(epd.1, c(epd.1@commdf@taxa_names, "prueba"),
get_taxonomy_epd(epd.connection))
colnames(epd.1.ft@commdf@counts)
epd.1.ft@commdf@taxanames
head(epd.1.ft@commdf@counts)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.