<p>As a moderator I have to cope with this issue many times a day, so let me briefly share the principal considerations that are involved.</p>

<hr>

<p>When it is at least <em>possible</em> to answer a question on stats, data analysis, or machine learning in a way that does not require knowledge of a particular computing platform or language, then it is potentially on topic here.</p>

<p>(Any <em>answer</em> to such a question that is comprehensible to a non-user of the target platform or language is therefore appropriate, even when it may include working code.  If it <em>only</em> includes working code, without further explanation, we may appreciate the respondent's effort but we should also be inclined to migrate the entire thread to SO.)</p>

<p>Questions that are understandable by or of interest <em>only</em> to users of a particular computing package or platform are <em>prima facie</em> about that platform and belong on SO.</p>

<p>We have the flexibility to point out that certain questions originating from software problems have universal interest.  We tend to employ that flexibility by encouraging posters to phrase their questions in general terms.  "How do I do a factor analysis in <code>R</code>" is off topic, but "What is it about <em>how</em> I am doing this factor analysis that causes this particular problem" is potentially on topic, regardless of whether the computing is being done in <code>R</code>, Stata, or by hand.</p>

<hr>

<p>Please note the important implications for would-be <em>answerers</em>: in order to communicate with everyone we speak the language of statistics here, not the narrower dialects known as SAS, <code>R</code>, Stata, SPSS, or whatever.  Therefore answers should not be presented solely in one of these languages, either.  We might look to the best publications in our field as a model: they all permit only a small number of natural languages and they employ a universal mathematical notation.  Papers submitted in Welsh or even Chinese are not accepted in most of them--even though Chinese may be one of the most spoken languages on the planet now.</p>
