In your example, if q0 = t, q1 = w, q2 = θ, q3 = Φ (where superscripts are indices), then the matrix of coefficients will be as follows, with superscript 2 denoting an exponent:
\begin{pmatrix}<br />
1 & 0 & 0 & 0\\ <br />
0 & R(t)^2 & 0 & 0\\ <br />
0 & 0 & (R(t) \cdot s)^2 & 0\\ <br />
0 & 0 & 0 & (R(t)\cdot s \cdot \sin(\theta))^2<br />
\end{pmatrix}
= diag(1,0,0,0) - R(t)2[diag(0,1,0,0) + s2(diag(0,0,1,0)+diag(0,0,0,sin(θ)2)].
Here diag(a,b,c,d) denotes a diagonal 4x4 matrix with diagonal entries as indicated, from top left to bottom right.
In general, given an expression of the form
ds^2 = ...,
where the values of the indices are not equal, the scalar coefficients in each term of the form
A \, dx^\mu dx^\nu \enspace (\text{no summation} )
(EDIT: Ignore the words "no summation" - a relic of previous version which I forgot to remove before posting. Sorry.) correspond to matrix entries
g_{\mu\nu} = \frac{1}{2} A.
And where the values of the indices are equal, the scalar coefficients in each term of the form
B \, (dx^\mu)^2
correspond to matrix entries
g_{\mu\mu} = B.