Description Usage Arguments Details Value Examples
This function transforms the counts matrix (samples x taxa) in
the @commdf@counts slot of a epd.entity.df-class
object to percentages relative to the total amount of particles 
in each sample (row).
| 1 2 3 4 5 6 7 | counts_to_percentages(x, offset = 1e-04)
## S4 method for signature 'epd.entity.df'
counts_to_percentages(x, offset = 1e-04)
## S4 method for signature 'epd.entity'
counts_to_percentages(x, offset = 1e-04)
 | 
| x | epd.entity  | 
| offset | numeric Numeric value to avoid dividing by zero 
if the total of particles is zero for a particular sample. This may 
happen when  | 
Although the function work with epd.entity.df-class and
epd.entity-class objects, the later are previously 
transformed using entity_to_matrices without any
posterior data manipulation and transformation. A lot of entities have
information from different taxonomical groups (terrestrial plants pollen 
and algae or fungi spores). Hence, percentages calculated in this base
may be meaningless and its use is unrecommended.
The function returns a epd.entity.df-class object, 
which is a modified version of x (or entity_to_matrices(x)
if x is a epd.entity-class object), in which
values in @counts slot represent percentages instead of raw counts.
| 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 <- filter_taxagroups(epd.1, c("DWAR", "HERB", "LIAN", "TRSH",
                           "UPHE", "INUN")) ## All pollen taxa groups
epd.1.percent <- counts_to_percentages(epd.1)
head(epd.1.percent@commdf@counts)
head(epd.1@commdf@counts)
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.