FormatPeakList error

Hi all! First of all I would like to apologize for duplicate questions, since I previously wrote the question as a Github Issue but suddenly I came to this forum. Feel free to delete the post if needed.
I am trying to format the annotated_peaks.csv file of peak list I got from two samples (sample group and control group) defined as follow in the metadata file with MetaboanalystR package:
Sample Group
2 20240129_SWATH-C-SAUVY-T7-Sample004.mzML CONTROL
3 20240129_SWATH-SAUVY-T7-Sample005.mzML SAMPLE

I tried the following:
maPeaks ← FormatPeakList(annotPeaks, annParams, filtIso =TRUE, filtAdducts = TRUE , missPercent = 1)

However I got the following error:
Error in `[.data.frame`(ma_feats, , (ma_feats[1, ] == as.character(grps_info[1]))) :
undefined columns selected

I found out that the error comes from the sentences that define group_info information:

ma_feats_miss ← ma_feats[which(rowMeans(is.na(ma_feats[,(ma_feats[1, ] == as.character(grps_info[1]))])) |
rowMeans(is.na(ma_feats[, (ma_feats[1, ] == as.character(grps_info[2]))])) <= missPercent), ]

Specially since group_info seems to be defined for more than 2 groups (grps_info ← names(grps_tb[grps_tb > 2]))
So, is there a way to format the annotated_peaks file according to CAMERA package for a couple of samples from 2 different groups?
Thank you in advance and, again, sorry for the question duplication.