Create diagrams using R