fractionOfSum | R Documentation |
The ReportFunction
fractionOfSum
represents the fraction of the sum of the TargetVariable
for two different grouping variables, where the GroupingVariables
is used in the numerator and the GroupingVariables
except the FractionOverVariable
is used in the denominator.
E.g., if GroupingVariables
is c("Survey", "SpeciesCategory", "Stratum"), FractionOverVariable
is "Stratum", TargetVariable
is "CatchFractionWeight", the total catch fraction weight for each stratum is divided by the total catch fraction weight of the survey (for each SpeciesCategory).
Warning! This function is used only to construct an expression to be evaluated in a data.table. Do not use this in R as a regular function like the other ReportFunctions
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.