Creates a new variable based on the arithmetic operation between two variables. Function is useful for creating rate variables or the summation of two related variables.
Arguments
- dat
Primary data containing information on hauls or trips. Table in the FishSET database contains the string 'MainDataTable'.
- project
Project name.
- x
Variable in
dat
. Variable will be the numerator ifmethod
is division.- y
Variable in
dat
or numeric value. Variable will be the denominator ifmethod
is division.- method
String, arithmetic expression. Options include:
"sum"
, addition ("add"
), subtraction ("sub"
), multiplication ("mult"
), and division ("div"
).- name
String, name of created vector. Defaults to name of the function if not defined.