The equality of $R=S$ is an example of an eta product identity of level $8$. In my collection of Dedekind Eta Product Identities I label it as $t_{8,18,60b}$ which can itself be derived from $t_{8,18,60a}$ and $t_{8,12,48}$. In terms of
Ramanujan theta functions it can be written as $\phi(-q)^2 = 2\phi(q^2)^2 - \phi(q)^2$ and this can be derived from $\phi(q)^2=\phi(q^2)^2+4q\psi(q^4)^2$ and $\phi(-q)^2=\phi(q^2)^2-4q\psi(q^4)^2$. In terms of Jacobi theta functions $R=S$ is as follows: $\theta_4(0,q)^2 = 2\theta_3(0,q^2)^2 - \theta_3(0,q)^2$. They form the basis for parameterization of the Arithmetic-Geometric Mean by squares of theta functions. More precisely, $\;a(q)^2 = b(q)^2 + c(q)^2\;$ where $a(q):=\theta_3(0,q)^2,\;b(q):=\theta_4(0,q)^2,\;c(q):=\theta_2(0,q)^2$ and $\;a(q^2)=(a(q)+b(q))/2,\;b(q^2)=\sqrt{a(q)b(q)},\;c(q^2)=(a(q)-b(q))/2.$
Let us define:
$$Q_0:=\prod_{n>0}1-q^{2n},\;Q_1:=\prod_{n>0}1+q^{2n},
\;Q_2:=\prod_{n>0}1+q^{2n-1},\;Q_3:=\prod_{n>0}1-q^{2n-1}.$$
There are many standard identities between theta functions and infinite products such as $Q_0,Q_1,Q_2,Q_3.$ For example, $1=Q_1Q_2Q_3$ and DLMF equations 20.4.4 and 20.4.5.
Thus, in $R$, $\;Q_0Q_3/(Q_1Q_2)=Q_0Q_3^2=\theta_4(0,q),\;$ and in $S$,
$\;Q_0Q_2/(Q_1Q_3)=Q_0Q_2^2=\theta_3(0,q).$
The $q$-series $R$ is the generating function of OEIS sequence A104794 and the infinite products in equation (2) come from sequence A004018 where much information is available.
In all these infinite sums and products, we have to require $|q|<1$ for convergence.