<p>Programming questions are off-topic, but there are some grey areas. It's fine to ask here if the core of the question is statistical. From the help page <a href="https://stats.stackexchange.com/help/on-topic">https://stats.stackexchange.com/help/on-topic</a>:</p>
<blockquote>
<p>There are certain subjects that will probably get better responses on
our sister sites. If your question is about</p>
<ul>
<li>Programming, ask on Stack Overflow. If the language is statistically
oriented (such as R, SAS, Stata, SPSS, etc.), then decide based on the
nature of your question: if it needs statistical expertise to
understand or answer, ask it here; if it's about the implementation of
an algorithm, routine data processing, or details of the language,
then please refer to the collection of links to resources we maintain.</li>
</ul>
</blockquote>
