{"action":"created","issue":{"url":"https://api.github.com/repos/ropensci/neotoma/issues/117","labels_url":"https://api.github.com/repos/ropensci/neotoma/issues/117/labels{/name}","comments_url":"https://api.github.com/repos/ropensci/neotoma/issues/117/comments","events_url":"https://api.github.com/repos/ropensci/neotoma/issues/117/events","html_url":"https://github.com/ropensci/neotoma/issues/117","id":40849171,"number":117,"title":"S3 methods not using arguments consistent with their generic","user":{"login":"gavinsimpson","id":514696,"avatar_url":"https://avatars.githubusercontent.com/u/514696?v=3","gravatar_id":"","url":"https://api.github.com/users/gavinsimpson","html_url":"https://github.com/gavinsimpson","followers_url":"https://api.github.com/users/gavinsimpson/followers","following_url":"https://api.github.com/users/gavinsimpson/following{/other_user}","gists_url":"https://api.github.com/users/gavinsimpson/gists{/gist_id}","starred_url":"https://api.github.com/users/gavinsimpson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gavinsimpson/subscriptions","organizations_url":"https://api.github.com/users/gavinsimpson/orgs","repos_url":"https://api.github.com/users/gavinsimpson/repos","events_url":"https://api.github.com/users/gavinsimpson/events{/privacy}","received_events_url":"https://api.github.com/users/gavinsimpson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2014-08-21T21:01:01Z","updated_at":"2015-02-25T17:42:18Z","closed_at":null,"body":"When you do `R CMD check` on the **neotoma** tarball lots of warnings ar generated along the lines of:\r\n\r\n```\r\n* checking S3 generic/method consistency ... WARNING\r\nget_dataset:\r\n  function(x, ...)\r\nget_dataset.default:\r\n  function(siteid, datasettype, piid, altmin, altmax, loc, gpid,\r\n           taxonids, taxonname, ageold, ageyoung, ageof, subdate)\r\n```\r\n\r\nThis is because the S3 methods have been incorrectly set up. An S3 method must have the same arguments as the generic. A method can have additional arguments but it must have the arguments of the generic. In the case above, the `get_dataset.default` method has first argument `siteid` where as the generic has argument `x`. The method is also lacking the `...` argument.\r\n\r\nThe obvious fix is to rewrite the definition of the generic as:\r\n\r\n```\r\n`get_dataset` <- function(siteid, ...)\r\n```\r\n\r\nand the method as\r\n\r\n```\r\n`get_dataset.default` <- function(siteid, datasettype, piid, altmin, altmax, loc, gpid,\r\n           taxonids, taxonname, ageold, ageyoung, ageof, subdate, ...)\r\n```\r\n\r\nThis needs doing for all (or most) of the new S3 methods added recently."},"comment":{"url":"https://api.github.com/repos/ropensci/neotoma/issues/comments/76014691","html_url":"https://github.com/ropensci/neotoma/issues/117#issuecomment-76014691","issue_url":"https://api.github.com/repos/ropensci/neotoma/issues/117","id":76014691,"user":{"login":"SimonGoring","id":1619126,"avatar_url":"https://avatars.githubusercontent.com/u/1619126?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonGoring","html_url":"https://github.com/SimonGoring","followers_url":"https://api.github.com/users/SimonGoring/followers","following_url":"https://api.github.com/users/SimonGoring/following{/other_user}","gists_url":"https://api.github.com/users/SimonGoring/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonGoring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonGoring/subscriptions","organizations_url":"https://api.github.com/users/SimonGoring/orgs","repos_url":"https://api.github.com/users/SimonGoring/repos","events_url":"https://api.github.com/users/SimonGoring/events{/privacy}","received_events_url":"https://api.github.com/users/SimonGoring/received_events","type":"User","site_admin":false},"created_at":"2015-02-25T17:42:18Z","updated_at":"2015-02-25T17:42:18Z","body":"I know.  I'm still working on building the habits necessary for good\ncollaborative coding :)\n\nOn Wed, Feb 25, 2015 at 11:24 AM, Gavin Simpson <notifications@github.com>\nwrote:\n\n> [image: :cry:] One feature/fix at a time :-) Atomise your commits/pushes\n> otherwise you'll keep on having trouble with merge conflicts or other\n> contributors will hold off doing work as they won't know what features of\n> the codebase you may or may not have worked on ;-)\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/ropensci/neotoma/issues/117#issuecomment-76009528>.\n>\n"}}