Coupled-channel R-matrix method on a Lagrange mesh