Decrement or increment a variable in the robot framework

Try putting it inside the var name. i.e.

${N_groups-1}

If the variable is already a number, you can use:

${N_groups}= ${N_groups-1}

To do this you need to coerce it to a number (otherwise you'll get an error saying failed: TypeError: coercing to Unicode: need string or buffer, int found), e.g.

*** Variables *** ${N_groups}= ${0} # ${} notation coerces value to a number

Alternatively, you can use Evaluate like this, which works whether ${N_groups} has been coerced to a number or not:

${N_groups}= Evaluate ${N_groups} - 1