get_pollen_sum()
get_pollen_sum | R Documentation |
Calculate the Total Pollen Count for Each Sample
Description
This function computes the total pollen count for each sample in the provided dataset.
Usage
get_pollen_sum(data)
Arguments
data
|
A data frame containing at least two columns: ‘sample_name’ (the name or identifier of the sample) and ‘pollen_count’ (the count of pollen for each observation). |
Details
The function groups the data by ‘sample_name’, calculates the sum of ‘pollen_count’ for each group, and removes any grouping structure before returning the result. Missing values (‘NA’) in ‘pollen_count’ are ignored.
Value
A data frame with two columns: ‘sample_name’ and ‘pollen_sum’, where ‘pollen_sum’ is the total pollen count for each sample.