Motion of a projectile in a rotated coordinate system, and converting equations to the new system Context: This in essence is explained on Mathematics of Classical & Quantum Physics by Byron & Fuller. This is from Section $1.4$, pages $12-13$.

So, suppose we launch a projectile (mass $m$) in the $x_1x_2$ plane, with initial velocity $\mathbf{v_0}$, at an angle of $\theta$ from the positive $x_1$-axis. We would like to consider the equations of motion in the $x_1'x_2'$ plane, which (to my understanding) should be formed by rotating the former coordinates (call them $K$) by $\theta$ to get a new set ($K'$). We keep things simple and only assume a downward force, $-mg$, per Newton's law.
The text communicates this situation with this diagram. (I believe there is a typo; it should be $x_2$ and $x_2'$ wherever $y_2$ and $y_2'$, respectively, are mentioned.)

To keep things brief, the text claims the following equations of motion, in the $K$ frame and the $K'$ frame respectively:
$$\begin{align*} \newcommand{\t}{\theta}
m \ddot x_1 = 0         &\xrightarrow{\text{rotate $K \to K'$}} m \ddot x_1' = -mg \sin \t \tag{1} \\
m \ddot x_2 = -mg       &\xrightarrow{\text{rotate $K \to K'$}} m \ddot x_2' = -mg \cos \t \tag{2}\\
x_1(0) = 0         &\xrightarrow{\text{rotate $K \to K'$}} x_1'(0) = 0 \tag{3} \\
x_2(0) = 0         &\xrightarrow{\text{rotate $K \to K'$}} x_2'(0) = 0 \tag{4} \\
\dot x_1(0) = v_0 \cos \t     &\xrightarrow{\text{rotate $K \to K'$}} \dot x_1'(0) = v_0 \tag{5} \\
\dot x_2(0) = v_0 \sin \t      &\xrightarrow{\text{rotate $K \to K'$}} \dot x_2'(0) = 0 \tag{6} \\
x_2 = \frac{-g}{2v_0^2 \cos^2 \t} x_1^2 + x_1 \tan \t  &\xrightarrow{\text{rotate $K \to K'$}} 
x_1' = x_2' \tan \t + v_0 \sqrt{ \frac{2 x_2'}{-g \cos \t}} \tag{7}
\end{align*}$$
My goal is to verify these. That is, I want to figure out how to convert from $K$ to $K'$, and then verify the above conversions.
I would think that the natural conversion is simply through a rotation matrix. As you'll recall, the matrix associated with rotating $\mathbb{R}^2$ by $\theta$ counterclockwise is
$$R = \begin{pmatrix}
\cos \t & -\sin \t \\
\sin \t & \cos \t \end{pmatrix}
\newcommand{\m}[1]{\begin{pmatrix} #1 \end{pmatrix}}$$
Hence, to verify $(1)$ and $(2)$, we would look at this calculation:
$$\begin{align*}\m{
\cos \t & -\sin \t \\
\sin \t & \cos \t}
\m{ \ddot x_1 \\ \ddot x_2} &= 
\m{
\cos \t & -\sin \t \\
\sin \t & \cos \t}
\m{ 0 \\ -g} \\
&= \m{g \sin \t \\ -g \cos \t}  
\end{align*}
$$
This does not give me $(\ddot x_1,\ddot x_2)^T$ however... Looking at $(3)$ and $(4)$ is trivial, so we'll ignore them; the subsequent pair, $(5)$ and $(6)$, give us
$$\begin{align*}\m{
\cos \t & -\sin \t \\
\sin \t & \cos \t}
\m{ \dot x_1(0) \\ \dot x_2(0) } &= 
\m{
\cos \t & -\sin \t \\
\sin \t & \cos \t}
\m{ v_0 \cos \t \\ v_0 \sin \t} \\
&=  \m{
v_0 \cos^2 \t - v_0 \sin^2 \t \\
v_0 \sin \t \cos \t + v_0 \sin \t \cos \t }
\end{align*}$$
again problematic.
What bugs me further is that if I tweak $R$ a bit, to get, say,
$$S = R^T = R^{-1}= \begin{pmatrix}
\cos \t & \sin \t \\
-\sin \t & \cos \t \end{pmatrix}$$
then something else happens. In $(5)$ and $(6)$, applying $S$ as the transformation $K \to K'$ gives
$$\begin{align*}\m{
\cos \t & \sin \t \\
-\sin \t & \cos \t}
\m{ \dot x_1(0) \\ \dot x_2(0) } &= 
\m{
\cos \t &  \sin \t \\
-\sin \t & \cos \t} 
\m{ v_0 \cos \t \\ v_0 \sin \t} \\ 
&=  \m{
v_0 \cos^2 \t + v_0 \sin^2 \t \\
-v_0 \sin \t \cos \t + v_0 \sin \t \cos \t } \\  
&=\m{
v_0  \\
0} \\
\end{align*}$$
as we'd expect! And if I look at $(1)$ and $(2)$ again, we get
$$\begin{align*}\m{
\cos \t & \sin \t \\
-\sin \t & \cos \t}
\m{ \ddot x_1 \\ \ddot x_2} &= 
\m{
\cos \t & \sin \t \\
-\sin \t & \cos \t}
\m{ 0 \\ -g} \\
&= \m{-g \sin \t \\ -g \cos \t}  
\end{align*}
$$

But this does not make any sense to me. $S$ corresponds to a clockwise rotation by $\t$, not counterclockwise. Why should $S$ be giving the correct answers?
Can anyone explain this strange discrepancy to me? The equations of motion also seem to be correct for what it's worth. (I also apologize in advance if it's a little too basic; physics is far from my forte.)

If you  rotate the gravity vector to $~S'~$
you obtain:
\begin{align*}
&\vec{g}'=\left[ \begin {array}{ccc} \cos \left( \theta \right) &\sin \left( 
\theta \right) &0\\  -\sin \left( \theta \right) &
\cos \left( \theta \right) &0\\  0&0&1\end {array}
 \right]\,\begin{bmatrix}
   0 \\
   -g \\
   0 \\
 \end{bmatrix}=-g\begin{bmatrix}
  \sin(\theta) \\
  \cos(\theta) \\
\end{bmatrix}
\end{align*}
from here
$$x'=v_0\,t+(\vec{g}')_x\,\frac{t^2}{2}=v_0\,t-g\,\sin(\theta)\,\frac{t^2}{2}\\
y'=+(\vec{g}')_y\,\frac{t^2}{2}=-g\,\cos(\theta)\,\frac{t^2}{2}$$
