If you want to share a snippet of R code with others—e.g. for teaching or to get help on Stack Overflow—consider using R-Fiddle.
While gists are good for basic code sharing, R-Fiddle allows others to execute the code in place. You can even embed the code together with a working R console in blog posts (as an iframe).