As others have mentioned - I would second. A good website. Let them come to you. Give your solutions to common problems. Create a github. Provide repeatable examples on your GitHub and encourage contact for custom solutions.
This won’t be a multi million dollar business. At best you’ll give yourself some work to get your name out. Companies don’t talk to each other - but maybe your niche is different. This is really the only path I can see without attaching yourself to a larger entity.
Agree on stack overflow. And part of learning how to program is trying to structure logic into thoughtful questions.
With R specifically I’d recommend looking into the tidyverse library for R. Or at least understand the libraries your work environment will be specifying to make sure you’re on the same page.