I'm trying to use either pracma::quadprog or quadprog::solve.QP in R to solve a ridge regression, which can be written as a constrained optimization:
$$\begin{aligned}
minimize \ \frac12|| y - X \beta||_2^2 \\
s.t. ||\beta||_2^2 \leq t
\end{aligned}$$
While both functions can solve $$\begin{aligned} minimize \ \frac12x^TQx+d^Tx \\ s.t. Ax \leq b \end{aligned}$$
I think I can let $Q = X^TX$, $d = y^TX$, the objective of ridge regression could be used in either function. But I'm wondering how I could transform $||\beta||_2^2 \leq t$ to $Ax \leq b$ as the former is quadratic?