5.6 Updating feature group data

The feature group properties such as retention time and m/z are calculated during the feature grouping process. These properties usually represent an average calculated from the features within the group, and are e.g. used to match suspects. It may be useful to recalculate these values after e.g. filtering noisy features to to improve the accuracy. This is achieved with the updateGroups function:

fGroups <- filter(fGroups, ...) # perform filtering steps

fGroups <- updateGroups(fGroups) # update retention time and m/z by re-averaging data
fGroups <- updateGroups(fGroups, intWeight = TRUE) # use intensity weighting for averaging
fGroups <- updateGroups(fGroups, what = c("mz")) # only update m/z values