taxa_to_acceptedtaxa: Change taxa to accepted taxa names

Description Usage Arguments Value Examples

Description

This function modifies the taxa names in the @commdf@counts slot of epd.entity.df-class objects. More specifically, this function compares the taxa name with the taxonomy of the EPD to use the accepted names. If these changes result in duplicated columns of the same taxa their values are unified by summing them.

Usage

1
2
3
4
5
6
7
taxa_to_acceptedtaxa(x, epd.taxonomy)

## S4 method for signature 'epd.entity.df,data.frame'
taxa_to_acceptedtaxa(x, epd.taxonomy)

## S4 method for signature 'epd.entity,data.frame'
taxa_to_acceptedtaxa(x, epd.taxonomy)

Arguments

x

epd.entity.df Object of class epd.entity.df-class with a @commdf@counts slot.

epd.taxonomy

data.frame Data frame with the taxonomy from the EPD as from the get_taxonomy_epd function.

Value

epd.entity.df-class object with new taxa names.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
epd.connection <- connect_to_epd(host="localhost", database="epd",
                                 user="epdr", password="epdrpw")
epd.1 <- get_entity(1, epd.connection)
epd.1 <- entity_to_matrices(epd.1)
epd.1@commdf@taxanames
colnames(epd.1@commdf@counts)
epd.1.acc <- taxa_to_acceptedtaxa(epd.1, get_taxonomy_epd(epd.connection))
epd.1.acc@commdf@taxanames
colnames(epd.1.acc@commdf@counts)

## End(Not run)

dinilu/EPDr documentation built on Aug. 22, 2019, 1:03 p.m.