A general way of expressing a four-current due to a single charge is: $J^\mu\left(x\right) =qc\int d\tau \, u^\mu \delta^{\left(4\right)}\left(x-\bar{x}\left(\tau\right)\right)$ Where $q$ is the charge, $c$ is the speed of light, $\delta^{\left(4\right)}\left(x-\bar{x}\left(\tau\right)\right)=\delta\left(c\left(t-\bar{t}\left(\tau\right)\right)\right)\delta^{\left(3\right)}\left(\mathbf{r}-\bar{\mathbf{r}}\left(\tau\right)\right)$ is the 4d delta function, $\tau$ is the proper time of the particle and $\bar{x}^\mu=\bar{x}^\mu\left(\tau\right)$ is the world line of the particle. This should be your starting point, IMHO. Also, accrding to my calculations: $\frac{1}{c^2}\int d^3 r\, \gamma\left(t\right) u_\mu\left(t\right) J^\mu\left(t,\mathbf{r}\right)=q$ where $\gamma$ is the Lorentz factor of the charge. So maybe this is what you were looking for. Still, your question was about how to deal with $f=f\left(\mathbf{r}-\bar{\mathbf{r}}\left(t\right)\right)$ (I hope you don't mind me changing notation slightly). Now you want to consider some boosted frame with coordinates $\{ct',\,\mathbf{r}'\}$. Clearly you will have a procedure for changin the coordinates from $S'$ to $S$: $t=t\left(t',\,\mathbf{r}'\right)$ and $\mathbf{r}=\mathbf{r}\left(t',\mathbf{r}'\right)$. Essentially, the inverse of what you wrote. Then your function in $S'$ is simply: $f\,in\,S'=f\left(\mathbf{r}\left(t',\mathbf{r}'\right)-\bar{\mathbf{r}}\left(t\left(t',\mathbf{r}'\right)\right)\right)$ However you have to be careful. Just because the function is not a vector it does not mean it is a true scalar. For example $\delta^{\left(3\right)}$, i.e. the 3d delta-function, is actually a density, hence when you change coordinate frame you will get Jacobians coming out (hello length contraction). Also, you have to be careful with integrals $\int d^3 r\dots$ is an integral over 3d space that is perpendicular to temporal axis in the current refrence frame. In a different reference frame this 3d space will no longer be perpendicular to temporal axis, it could be partially spatial and partially temporal.