In this question, there is a factual error about the documentation in R. I believe the actual question being asked is a useful one.
Should I correct the factual error, or leave the correction as a comment, as I have already done?
I generally only lurk here at CrossValidated, but based on my experience at StackOverflow, I believe that the crucial point here is whether the factual error is in a question or an answer.
One will frequently see something that seems obviously wrong or mistaken in a question. If the asker wasn't confused about something they probably wouldn't be asking a question, would they?
The rule I follow is that I will never "fix" mistakes in questions unilaterally. The mistake in the question may be the very source of their confusion and hence would be essential to answering the question. Instead, I always leave a comment pointing out the error and asking for clarification. But even then, I would let the OP fix any errors. Even if they fail to respond after a week, there is too much danger that editing to "fix" the error would radically alter the meaning and intent of the question. My comment would remain visible, though, to alert others readers of the issue.
On the other hand, if I spot an error in an answer I would adopt an approach more like what is sketched out in @atiretoo's answer: leave a comment, possibly downvote, and wait. If there's no response in a suitable amount of time, perform the edit myself.
Finally, this obviously applies primarily to errors in content, rather than style.
So based on 2 comments worth of community input, here's a proposed "best practice".