This module is to optimize the `indexVec` variable by removing elements that have redundant `idVec` numbers.
FSA_aggregate(idVec, variableVec, indexVec, targetVar)a clean indexVec after removing redundant `idVec`.
a vector of id numbers. Repeated id numbers are allowed
a vector of variable of the interest such as RT, m/z, etc.
a vector of indices
the targeted value in `variableVec`