Riemann curvature tensor
To calculate the variation of the Ricci scalar we calculate first the variation of the Riemann curvature tensor, and then the variation of the Ricci tensor. So, the Riemann curvature tensor is defined as