# Migration that went wrong

Recently we migrated question about repeating simulation function in R to SO. Initially I voted to migrate it to SO, however then it got quite nice answer by Xi'an that focused on its statistical content. This made me retract my vote, however it was migrated since it gathered enough votes for migration. Now we have very purely formatted question and answer (SO does not allow for TeX) and they taken together do not really fit well to SO. We probably cannot migrate them back, but maybe we should be more careful about such decisions? Is it an example of on-topic or off-topic question?

• Similar incident in the past: meta.stats.stackexchange.com/questions/2775. – amoeba says Reinstate Monica Feb 22 '16 at 10:28
• Contrariwise, the answer does focus on R code and is really not out of place on SO. Note that SO people are capable of bouncing questions back. On some questions, which forum is better is hard to call. That doesn't undermine the principle of sending questions where they best belong (including nowhere sometimes; someone sent in something about relationship guidance not so long ago). – Nick Cox Feb 22 '16 at 10:41
• I agree with @NickCox (and whuber, +1 to each) that migration is not necessarily problematic - certainly the questioner was really after R code, and that was what was supplied, which makes migration to SO reasonable - I can see Tim's point that the solution made use of a statistical property of the time series. I think if the question had been phrased in a different way, with less software-specific orientation, I think it would have made a good question on CV also. – Silverfish Feb 22 '16 at 16:05
• (Something worth bearing in mind when math-heavy posts are migrated to SO is that it messes up the Latex, as it isn't supported over there.) – Silverfish Feb 22 '16 at 19:17

It looks like the community made the right decision. Xi'an's answer was purely software-oriented, explaining how to use cusum and an iterator in R to accomplish a calculation efficiently. That makes it a fine answer--on Stack Overflow.