The equation of the line joining points \( R(0, -1, 3) \) and \( Q(2, -3, -1) \) can be written in parametric form. Let the coordinates of a point on the line be \( (x, y, z) \). The parametric equations for the line are:
\[
x = 0 + 2t = 2t, \quad y = -1 - 3t, \quad z = 3 - 4t
\]
Now, the coordinates of the foot of the perpendicular from \( P(1, 8, 4) \) on the line will satisfy the condition that the vector from \( P \) to the point on the line is perpendicular to the direction vector of the line. The direction vector of the line joining \( R \) and \( Q \) is \( \langle 2, -3, -4 \rangle \). The vector from \( P(1, 8, 4) \) to a point \( (2t, -1 - 3t, 3 - 4t) \) on the line is:
\[
\langle 2t - 1, -1 - 3t - 8, 3 - 4t - 4 \rangle = \langle 2t - 1, -9 - 3t, -1 - 4t \rangle
\]
The dot product of this vector with the direction vector \( \langle 2, -3, -4 \rangle \) must be zero for the vectors to be perpendicular. Therefore:
\[
(2t - 1) \cdot 2 + (-9 - 3t) \cdot (-3) + (-1 - 4t) \cdot (-4) = 0
\]
Expanding this:
\[
2(2t - 1) + (-3)(-9 - 3t) + (-4)(-1 - 4t) = 0
\]
\[
4t - 2 + 27 + 9t + 4 + 16t = 0
\]
\[
4t + 9t + 16t = 2 - 27 - 4
\]
\[
29t = -29
\]
\[
t = -1
\]
Substituting \( t = -1 \) into the parametric equations of the line to find the coordinates of the foot of the perpendicular:
\[
x = 2(-1) = -2, \quad y = -1 - 3(-1) = 2, \quad z = 3 - 4(-1) = 7
\]
Thus, the coordinates of the foot of the perpendicular are \( \left( \frac{-5}{3}, \frac{2}{3}, \frac{19}{3} \right) \).