  The main objective of this paper is to give a rigorous treatment of Wigner's
and Eisenbud's $R$-matrix method for scattering matrices of scattering systems
consisting of two selfadjoint extensions of the same symmetric operator with
finite deficiency indices. In the framework of boundary triplets and associated
Weyl functions an abstract generalization of the $R$-matrix method is developed
and the results are applied to Schr\"odinger operators on the real axis.
