{"action":"created","issue":{"url":"https://api.github.com/repos/tidyverse/broom/issues/208","repository_url":"https://api.github.com/repos/tidyverse/broom","labels_url":"https://api.github.com/repos/tidyverse/broom/issues/208/labels{/name}","comments_url":"https://api.github.com/repos/tidyverse/broom/issues/208/comments","events_url":"https://api.github.com/repos/tidyverse/broom/issues/208/events","html_url":"https://github.com/tidyverse/broom/issues/208","id":213749725,"node_id":"MDU6SXNzdWUyMTM3NDk3MjU=","number":208,"title":"Feature request: report valid parameters for `tidy` and `glance` ","user":{"login":"hughjonesd","id":5818871,"node_id":"MDQ6VXNlcjU4MTg4NzE=","avatar_url":"https://avatars0.githubusercontent.com/u/5818871?v=4","gravatar_id":"","url":"https://api.github.com/users/hughjonesd","html_url":"https://github.com/hughjonesd","followers_url":"https://api.github.com/users/hughjonesd/followers","following_url":"https://api.github.com/users/hughjonesd/following{/other_user}","gists_url":"https://api.github.com/users/hughjonesd/gists{/gist_id}","starred_url":"https://api.github.com/users/hughjonesd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hughjonesd/subscriptions","organizations_url":"https://api.github.com/users/hughjonesd/orgs","repos_url":"https://api.github.com/users/hughjonesd/repos","events_url":"https://api.github.com/users/hughjonesd/events{/privacy}","received_events_url":"https://api.github.com/users/hughjonesd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-03-13T12:16:40Z","updated_at":"2018-06-09T00:19:29Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Hi,\r\n\r\nI'm writing a regression table creator for https://hughjonesd.github.io/huxtable . It uses `broom` as a backend: very nice. \r\n\r\nI would like to know, for a given object `x`, whether I can call `tidy(x, conf.int = TRUE)`. At the moment, I look at the formals of the relevant object:\r\n\r\n```\r\nhas_builtin_ci <- function (x) {\r\n  objs <- sapply(class(x), function (y) try(getS3method('tidy', y), silent = TRUE))\r\n  obj <- Find(function(x) class(x) == 'function', objs)\r\n  if (is.null(obj)) return(FALSE)\r\n  argnames <- names(formals(obj))\r\n  all(c('conf.int', 'conf.level') %in% argnames)\r\n}\r\n\r\n```\r\n\r\nThis is a bit imperfect (did you know [R has no built in way of telling you what function will be called on a given object?](http://stackoverflow.com/questions/42738851/r-how-to-find-what-s3-method-will-be-called-on-an-object/))\r\n\r\nIt would be nice if I could find out, for a given object or class, (a) what parameters are available for `tidy` and `glance` and perhaps also (b) what columns they will return. \r\n\r\nI think this fits with `broom`'s idea of providing more guarantees of \"what to expect\" from model output. \r\n\r\nIf you're open to a pull request, tell me and I will see what I can do."},"comment":{"url":"https://api.github.com/repos/tidyverse/broom/issues/comments/395924433","html_url":"https://github.com/tidyverse/broom/issues/208#issuecomment-395924433","issue_url":"https://api.github.com/repos/tidyverse/broom/issues/208","id":395924433,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTkyNDQzMw==","user":{"login":"alexpghayes","id":15078251,"node_id":"MDQ6VXNlcjE1MDc4MjUx","avatar_url":"https://avatars3.githubusercontent.com/u/15078251?v=4","gravatar_id":"","url":"https://api.github.com/users/alexpghayes","html_url":"https://github.com/alexpghayes","followers_url":"https://api.github.com/users/alexpghayes/followers","following_url":"https://api.github.com/users/alexpghayes/following{/other_user}","gists_url":"https://api.github.com/users/alexpghayes/gists{/gist_id}","starred_url":"https://api.github.com/users/alexpghayes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexpghayes/subscriptions","organizations_url":"https://api.github.com/users/alexpghayes/orgs","repos_url":"https://api.github.com/users/alexpghayes/repos","events_url":"https://api.github.com/users/alexpghayes/events{/privacy}","received_events_url":"https://api.github.com/users/alexpghayes/received_events","type":"User","site_admin":false},"created_at":"2018-06-09T00:19:29Z","updated_at":"2018-06-09T00:19:29Z","author_association":"COLLABORATOR","body":"Sorry for the delay getting back to you. I think this is an interesting idea although am not entirely sure how I feel about it yet.\r\n\r\nI'm interested in strictly enforcing a set of allowable column names in tidy output, but I don't think that solves your problem.\r\n\r\nI suspect that autogenerating from `roxygen` will be rather unwieldy because we've been pretty lenient when accepting pull requests and the documentation is of varied quality at the moment.\r\n\r\nAt some point soon I'm going to need to go through the documentation to clean it up. At the moment, I'm planning to follow up after that.\r\n\r\n"}}
{"actor":{"display_login":"alexpghayes"}}