{"action":"opened","issue":{"url":"https://api.github.com/repos/plotly/documentation/issues/387","repository_url":"https://api.github.com/repos/plotly/documentation","labels_url":"https://api.github.com/repos/plotly/documentation/issues/387/labels{/name}","comments_url":"https://api.github.com/repos/plotly/documentation/issues/387/comments","events_url":"https://api.github.com/repos/plotly/documentation/issues/387/events","html_url":"https://github.com/plotly/documentation/issues/387","id":155725545,"number":387,"title":"Fix broken R examples","user":{"login":"cpsievert","id":1365941,"avatar_url":"https://avatars.githubusercontent.com/u/1365941?v=3","gravatar_id":"","url":"https://api.github.com/users/cpsievert","html_url":"https://github.com/cpsievert","followers_url":"https://api.github.com/users/cpsievert/followers","following_url":"https://api.github.com/users/cpsievert/following{/other_user}","gists_url":"https://api.github.com/users/cpsievert/gists{/gist_id}","starred_url":"https://api.github.com/users/cpsievert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpsievert/subscriptions","organizations_url":"https://api.github.com/users/cpsievert/orgs","repos_url":"https://api.github.com/users/cpsievert/repos","events_url":"https://api.github.com/users/cpsievert/events{/privacy}","received_events_url":"https://api.github.com/users/cpsievert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-19T12:32:23Z","updated_at":"2016-05-19T12:32:23Z","closed_at":null,"body":"Some of our r pages are using old, backward-incompatible code -- here are some things to watch out for:\r\n\r\n* Trace properties are no longer inherited when adding traces to an existing plot. So, for example, the second example on <https://plot.ly/r/bar-charts/> should be:\r\n\r\n```r\r\np2 <- add_trace(\r\n  p,\r\n  x = c(\"giraffes\", \"orangutans\", \"monkeys\"),\r\n  y = c(12, 18, 29),\r\n  name = \"LA Zoo\",\r\n  type = \"bar\"\r\n)\r\n```\r\n\r\ninstead of \r\n\r\n```r\r\np2 <- add_trace(\r\n  p,\r\n  x = c(\"giraffes\", \"orangutans\", \"monkeys\"),\r\n  y = c(12, 18, 29),\r\n  name = \"LA Zoo\",\r\n  filename=\"r-docs/simple-bars\"\r\n)\r\n```\r\n\r\n\r\n* Also, note that `filename` is no longer an argument in `plot_ly()` or `add_trace()`. It is only relevant for `plotly_POST()`"}}