I wrote a paper with a new approach and I implemented this approach in both R and SAS. I want to put the software online on Github and ideally on CRAN too. The paper has been reviewed by my collaborators, but I was told that the structure is atypical as this is my first paper and I used a structure more typical of a thesis. The paper will need to go trough major changes and it will have the reorganized differently. Still the modelling approach itself is good and well detailed in the paper.
I’d like to release the software on Github and include the current draft of the paper with it but I’m wondering if I should also sent it to ArXiv at the same time even though it’s not publication-ready. Is putting my paper on Github (and maybe Researchgate?) enough to prevent someone from legally stealing my work? Can I and should I send it to a place like ArXiv? Should I put a license on the online draft?