Questions related to programming/coding is mostly related to Stackoverflow.
R is a programming language for statistical computing. Can we ask questions related to R-programming??
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 https://stats.stackexchange.com/help/on-topic:
There are certain subjects that will probably get better responses on our sister sites. If your question is about
- 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.