Let's consider the simplest case: There is measurement error in $Y$ only. It is normally distributed, centered on the true value of each $y_i$, and independent (of the value of $y_i$, $x_i$, etc.). We'll say the standard deviation of the measurement error is $0.1$. That seems to be the situation you have in mind.
In this case, the variance of the residuals will be inflated relative to the true variance of the errors. (Note that "errors" is the traditional—unfortunate—name of the random part of the data generating process, they are not erroneous in the everyday sense, and they are not the same as the measurement errors.) Specifically, variances add, so the expected variance of the residuals will be the true variance of the errors plus the variance of the measurement error. What R
calls the "residual standard error" is (somewhat bizarrely) the standard deviation of the residuals (cf., here), so you need to square that to get the variance. If you knew the variance of the measurement error a-priori, or had some independent estimate of it, you could simply subtract that value from the result. If you'd like, you could take the square root of the difference to get an estimate of the SD of the errors.
On the other hand, the standard error of the slope is based on the variability in your observed data. Since this is what was used to fit the slope, and slopes fit on data with measurement error should bounce around more widely that slopes fit on data measured without measurement error. As a result, I would not advise you to try to remove the variance of the measurement error from the standard errors of your regression parameters. They are correct already.
lm
does not account for the errors iny
. $\endgroup$lm()
function inR
does not take into account this error in y"? Because that's untrue, we ought to explore the origin of this misbelief because it might help us understand what question you're actually trying to formulate. $\endgroup$