taxa_fill.Rd
Fill in NA values present in the taxonomic hierarchy with the previous taxonomic rank.
taxa_fill(.dataframe, .final_id, .prefix = "unidentified", ...)
.dataframe | Taxonomic counts arranged in a long data format. |
---|---|
.final_id | The name of the column that contains the final taxonomic ID. |
.prefix | A character string that will be added as a prefix to the filled values separated by an underscore. The default is "unidentified" and would produce for example "unidentified_ephmeroptera" as a fill value. This is important for distinguishing these filled values when working with taxonomic metrics. |
... | A set of columns related to taxonomic ranks where NA values will be replaced with the previous taxonomic rank. It is important to list these columns in the appropriate order (e.g. phylum to species). The order the columns are presented is used to create the hierarchy that identifies the previous taxonomic rank. |
A data frame.