How to make H1 (#) tags into tabs in RMarkdown?

Just for completeness this is also posted on SO

Please take a look into our cross posting policy