Specifying Grouping in XGBoost R package

I cannot find how to specify the grouping id when using the pairwise:ranking objective . Does anyone know of any explicit examples?

Take a look at this example: https://github.com/dmlc/xgboost/blob/92ae3abc972c100a11d7e75fb6dbeebdb7cefd1e/R-package/tests/testthat/test_ranking.R#L7-L16

Thank You !! It appears to be exactly what I needed!