The description of off-shell resonances by R-matrix theory