{"action":"created","issue":{"url":"https://api.github.com/repos/rich-iannone/DiagrammeR/issues/71","labels_url":"https://api.github.com/repos/rich-iannone/DiagrammeR/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/rich-iannone/DiagrammeR/issues/71/comments","events_url":"https://api.github.com/repos/rich-iannone/DiagrammeR/issues/71/events","html_url":"https://github.com/rich-iannone/DiagrammeR/issues/71","id":59406069,"number":71,"title":"using subscripts in diagrams","user":{"login":"martinez-bakker","id":10421365,"avatar_url":"https://avatars.githubusercontent.com/u/10421365?v=3","gravatar_id":"","url":"https://api.github.com/users/martinez-bakker","html_url":"https://github.com/martinez-bakker","followers_url":"https://api.github.com/users/martinez-bakker/followers","following_url":"https://api.github.com/users/martinez-bakker/following{/other_user}","gists_url":"https://api.github.com/users/martinez-bakker/gists{/gist_id}","starred_url":"https://api.github.com/users/martinez-bakker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinez-bakker/subscriptions","organizations_url":"https://api.github.com/users/martinez-bakker/orgs","repos_url":"https://api.github.com/users/martinez-bakker/repos","events_url":"https://api.github.com/users/martinez-bakker/events{/privacy}","received_events_url":"https://api.github.com/users/martinez-bakker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-03-01T17:04:49Z","updated_at":"2015-03-02T08:37:02Z","closed_at":null,"body":"Hello,\r\n\r\nThanks for making this great package. I have a question, not really an issue. Could someone share how to use subscripts within a diagram? I have been trying to use paste0() and expressions to do this, but I have not managed to figure it out. \r\n\r\nAll the best,\r\nMicaela "},"comment":{"url":"https://api.github.com/repos/rich-iannone/DiagrammeR/issues/comments/76674886","html_url":"https://github.com/rich-iannone/DiagrammeR/issues/71#issuecomment-76674886","issue_url":"https://api.github.com/repos/rich-iannone/DiagrammeR/issues/71","id":76674886,"user":{"login":"rich-iannone","id":5612024,"avatar_url":"https://avatars.githubusercontent.com/u/5612024?v=3","gravatar_id":"","url":"https://api.github.com/users/rich-iannone","html_url":"https://github.com/rich-iannone","followers_url":"https://api.github.com/users/rich-iannone/followers","following_url":"https://api.github.com/users/rich-iannone/following{/other_user}","gists_url":"https://api.github.com/users/rich-iannone/gists{/gist_id}","starred_url":"https://api.github.com/users/rich-iannone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rich-iannone/subscriptions","organizations_url":"https://api.github.com/users/rich-iannone/orgs","repos_url":"https://api.github.com/users/rich-iannone/repos","events_url":"https://api.github.com/users/rich-iannone/events{/privacy}","received_events_url":"https://api.github.com/users/rich-iannone/received_events","type":"User","site_admin":false},"created_at":"2015-03-02T08:37:02Z","updated_at":"2015-03-02T08:37:02Z","body":"Spent a little time trying to make this a bit easier. Now by using the `@_{...}` or `@^{...}` constructions (for subscripting and superscripting, respectively), you can achieve the same thing:\r\n\r\n```R\r\nlibrary(DiagrammeR)\r\n\r\ngrViz(\"\r\ndigraph subscript {\r\n\r\n    # Graph statements\r\n    graph [layout = circo, overlap = false]\r\n\r\n    # Node statements\r\n    node [fontname = Helvetica]\r\n    a [label = 'Two@_{2}']\r\n    b [label = 'Three@^{3}']\r\n\r\n    # Edge statements\r\n    a -> b\r\n    }\r\n\")\r\n```\r\n\r\n![sub_super](https://cloud.githubusercontent.com/assets/5612024/6437451/f581e5e2-c073-11e4-9e69-a2579933c8de.png)\r\n\r\nGet the newest build of `DiagrammeR` with `devtools::github_install` to use this functionality. Warning though: it doesn't work (yet) if there is more than subscript or superscript in a label/tooltip. I'll address that soon.\r\n"}}