{"action":"created","issue":{"url":"https://api.github.com/repos/macroevolution/bammtools/issues/26","labels_url":"https://api.github.com/repos/macroevolution/bammtools/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/macroevolution/bammtools/issues/26/comments","events_url":"https://api.github.com/repos/macroevolution/bammtools/issues/26/events","html_url":"https://github.com/macroevolution/bammtools/issues/26","id":53128761,"number":26,"title":"plot.bammdata for negative net div rates","user":{"login":"drabosky","id":5825755,"avatar_url":"https://avatars.githubusercontent.com/u/5825755?v=3","gravatar_id":"","url":"https://api.github.com/users/drabosky","html_url":"https://github.com/drabosky","followers_url":"https://api.github.com/users/drabosky/followers","following_url":"https://api.github.com/users/drabosky/following{/other_user}","gists_url":"https://api.github.com/users/drabosky/gists{/gist_id}","starred_url":"https://api.github.com/users/drabosky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drabosky/subscriptions","organizations_url":"https://api.github.com/users/drabosky/orgs","repos_url":"https://api.github.com/users/drabosky/repos","events_url":"https://api.github.com/users/drabosky/events{/privacy}","received_events_url":"https://api.github.com/users/drabosky/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-12-30T16:48:59Z","updated_at":"2015-01-07T02:44:55Z","closed_at":"2015-01-07T02:44:55Z","body":"plot.bammdata, if log=TRUE, gives error when spex = \"se\", if net diversification rate is negative. SHould print more informative warning for this situation, or handle it in some other fashion (though not sure how, short of adding a constant to all values)\r\n\r\nalso: legend labels for log = TRUE should give the rates rather than log(rates)"},"comment":{"url":"https://api.github.com/repos/macroevolution/bammtools/issues/comments/68971635","html_url":"https://github.com/macroevolution/bammtools/issues/26#issuecomment-68971635","issue_url":"https://api.github.com/repos/macroevolution/bammtools/issues/26","id":68971635,"user":{"login":"blueraleigh","id":5657714,"avatar_url":"https://avatars.githubusercontent.com/u/5657714?v=3","gravatar_id":"","url":"https://api.github.com/users/blueraleigh","html_url":"https://github.com/blueraleigh","followers_url":"https://api.github.com/users/blueraleigh/followers","following_url":"https://api.github.com/users/blueraleigh/following{/other_user}","gists_url":"https://api.github.com/users/blueraleigh/gists{/gist_id}","starred_url":"https://api.github.com/users/blueraleigh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueraleigh/subscriptions","organizations_url":"https://api.github.com/users/blueraleigh/orgs","repos_url":"https://api.github.com/users/blueraleigh/repos","events_url":"https://api.github.com/users/blueraleigh/events{/privacy}","received_events_url":"https://api.github.com/users/blueraleigh/received_events","type":"User","site_admin":false},"created_at":"2015-01-07T02:44:55Z","updated_at":"2015-01-07T02:44:55Z","body":"this is dealt with by implementing a safeLog function when spex = \"se\" to take the logarithm of diversification rates and then using its inverse for generating the color breaks that define the color map.\r\n\r\nsafeLog(x, inverse = FALSE) {\r\n    if (inverse)\r\n          y =  exp(x) - attr(x, \"increment\")\r\n    else {\r\n           y = log(x + min(abs(x)) + 0.0001)\r\n           attr(y, \"increment\") = min(abs(x)) + 0.0001\r\n     }\r\n     return (y)\r\n}"}}