Electrodynamics: Derivatives involving Retarded-Time

• I
Hi all,

I have ran into some mathematical confusion when studying the aforementioned topic. The expression for retarded time is given as
$$t_R = t - R/c$$
##R = | \vec{r} - \vec{r'} |##, where ##\vec{r}## represents the point of evaluation and ##\vec{r'}## represents the source position. I rewrite the above equation into
$$x_i = x'_i + \text{terms independent of x' and x}$$
where ##x_i## is a cartesian coordinate. If I had the following derivative ##\partial _{x_i}##, could I then say this?
$$\partial _{x_i} = \frac{ \partial }{ \partial x'_i} \frac{ \partial x'_i}{ \partial x_i} = \partial _{x'_i}$$

If so, there is the following identity
$$\nabla(1/R) = - \nabla ' (1/R)$$
where the prime means that the derivative is with respect to source coordinates ##x' _i##

Suppose I start from the RHS:
$$\nabla (1/R) = \sum_i \partial_ {x_i} (\frac{1}{R}) \hat{x_i} = \sum_i \partial_ {x' _i} (\frac{1}{R}) \hat{x_i} = \nabla' (1/R)$$

which is clearly wrong. What have I done wrongly?