Consider the subgroup $G_{\lambda}$ of $SL_2(\mathbb R)$ generated by $N_{\lambda} = \begin{bmatrix} 1 & \lambda \\ 0 & 1 \end{bmatrix}$ and $S = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix}$ where $\lambda>0$. Then it's known by Hecke that $G_{\lambda}$ is discrete if and only if $\lambda \geq 2$ or $\lambda=2 \cos(\frac{\pi}{n})$ where $n \geq 3$ is an integer. They are named for Hecke, and are used by Hecke to study modular forms.
Is there is a generalization of this fact to more general groups? For example, consider a subgroup of $SL_n(\mathbb R)$ generated by several elementary matrices and some involutions, when is it discrete?
What about $p$-adic analogues?