fractionOfOccurrence: The fraction of occurrence function

fractionOfOccurrenceR Documentation

The fraction of occurrence function

Description

The ReportFunction fractionOfOccurrence represents the fraction of occurrence for two different grouping variables, where the GroupingVariables is used in the numerator and the GroupingVariables except the FractionOverVariable is used in the denominator. The occurrence is defined as 1 if the TargetVariable meets the condition defined by ConditionOperator and ConditionValue.

Details

E.g., if GroupingVariables is c("Survey", "SpeciesCategory", "Stratum"), ractionOverVariable is "Stratum", TargetVariable is "IndividualAge", ConditionOperator is ">" and ConditionValue is 0, the number of individuals with age larger than 0 for each stratum is divided by the total number of individuals of age large than 0 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.


StoXProject/RstoxBase documentation built on Nov. 6, 2024, noon