Skip to content

This is an extremely minimal client. You need to know the API to be able to use this client. All this function does is:

  • Try to substitute each listed parameter into endpoint, using the {parameter} notation.

  • If a GET request (the default), then add all other listed parameters as query parameters.

  • If not a GET request, then send the other parameters in the request body, as JSON.

  • Convert the response to an R list using jsonlite::fromJSON().

Usage

gh(
  endpoint,
  ...,
  per_page = NULL,
  .per_page = NULL,
  .token = NULL,
  .destfile = NULL,
  .overwrite = FALSE,
  .api_url = NULL,
  .method = "GET",
  .limit = NULL,
  .accept = "application/vnd.github.v3+json",
  .send_headers = NULL,
  .progress = TRUE,
  .params = list(),
  .max_wait = 600,
  .max_rate = NULL
)

Arguments

endpoint

GitHub API endpoint. Must be one of the following forms:

  • METHOD path, e.g. GET /rate_limit,

  • path, e.g. /rate_limit,

  • METHOD url, e.g. GET https://api.github.com/rate_limit,

  • url, e.g. https://api.github.com/rate_limit.

If the method is not supplied, will use .method, which defaults to "GET".

...

Name-value pairs giving API parameters. Will be matched into endpoint placeholders, sent as query parameters in GET requests, and as a JSON body of POST requests. If there is only one unnamed parameter, and it is a raw vector, then it will not be JSON encoded, but sent as raw data, as is. This can be used for example to add assets to releases. Named NULL values are silently dropped. For GET requests, named NA values trigger an error. For other methods, named NA values are included in the body of the request, as JSON null.

per_page, .per_page

Number of items to return per page. If omitted, will be substituted by max(.limit, 100) if .limit is set, otherwise determined by the API (never greater than 100).

.token

Authentication token. Defaults to GITHUB_PAT or GITHUB_TOKEN environment variables, in this order if any is set. See gh_token() if you need more flexibility, e.g. different tokens for different GitHub Enterprise deployments.

.destfile

Path to write response to disk. If NULL (default), response will be processed and returned as an object. If path is given, response will be written to disk in the form sent. gh writes the response to a temporary file, and renames that file to .destfile after the request was successful. The name of the temporary file is created by adding a -<random>.gh-tmp suffix to it, where <random> is an ASCII string with random characters. gh removes the temporary file on error.

.overwrite

If .destfile is provided, whether to overwrite an existing file. Defaults to FALSE. If an error happens the original file is kept.

.api_url

Github API url (default: https://api.github.com). Used if endpoint just contains a path. Defaults to GITHUB_API_URL environment variable if set.

.method

HTTP method to use if not explicitly supplied in the endpoint.

.limit

Number of records to return. This can be used instead of manual pagination. By default it is NULL, which means that the defaults of the GitHub API are used. You can set it to a number to request more (or less) records, and also to Inf to request all records. Note, that if you request many records, then multiple GitHub API calls are used to get them, and this can take a potentially long time.

.accept

The value of the Accept HTTP header. Defaults to "application/vnd.github.v3+json" . If Accept is given in .send_headers, then that will be used. This parameter can be used to provide a custom media type, in order to access a preview feature of the API.

.send_headers

Named character vector of header field values (except Authorization, which is handled via .token). This can be used to override or augment the default User-Agent header: "https://github.com/r-lib/gh".

.progress

Whether to show a progress indicator for calls that need more than one HTTP request.

.params

Additional list of parameters to append to .... It is easier to use this than ... if you have your parameters in a list already.

.max_wait

Maximum number of seconds to wait if rate limited. Defaults to 10 minutes.

.max_rate

Maximum request rate in requests per second. Set this to automatically throttle requests.

Value

Answer from the API as a gh_response object, which is also a list. Failed requests will generate an R error. Requests that generate a raw response will return a raw vector.

See also

gh_gql() if you want to use the GitHub GraphQL API, gh_whoami() for details on GitHub API token management.

Examples

## Repositories of a user, these are equivalent
gh("/users/hadley/repos", .limit = 2)
#> [
#>   {
#>     "id": 40423928,
#>     "node_id": "MDEwOlJlcG9zaXRvcnk0MDQyMzkyOA==",
#>     "name": "15-state-of-the-union",
#>     "full_name": "hadley/15-state-of-the-union",
#>     "private": false,
#>     "owner": {
#>       "login": "hadley",
#>       "id": 4196,
#>       "node_id": "MDQ6VXNlcjQxOTY=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/4196?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/hadley",
#>       "html_url": "https://github.com/hadley",
#>       "followers_url": "https://api.github.com/users/hadley/followers",
#>       "following_url": "https://api.github.com/users/hadley/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/hadley/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/hadley/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/hadley/subscriptions",
#>       "organizations_url": "https://api.github.com/users/hadley/orgs",
#>       "repos_url": "https://api.github.com/users/hadley/repos",
#>       "events_url": "https://api.github.com/users/hadley/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/hadley/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "html_url": "https://github.com/hadley/15-state-of-the-union",
#>     "description": {},
#>     "fork": false,
#>     "url": "https://api.github.com/repos/hadley/15-state-of-the-union",
#>     "forks_url": "https://api.github.com/repos/hadley/15-state-of-the-union/forks",
#>     "keys_url": "https://api.github.com/repos/hadley/15-state-of-the-union/keys{/key_id}",
#>     "collaborators_url": "https://api.github.com/repos/hadley/15-state-of-the-union/collaborators{/collaborator}",
#>     "teams_url": "https://api.github.com/repos/hadley/15-state-of-the-union/teams",
#>     "hooks_url": "https://api.github.com/repos/hadley/15-state-of-the-union/hooks",
#>     "issue_events_url": "https://api.github.com/repos/hadley/15-state-of-the-union/issues/events{/number}",
#>     "events_url": "https://api.github.com/repos/hadley/15-state-of-the-union/events",
#>     "assignees_url": "https://api.github.com/repos/hadley/15-state-of-the-union/assignees{/user}",
#>     "branches_url": "https://api.github.com/repos/hadley/15-state-of-the-union/branches{/branch}",
#>     "tags_url": "https://api.github.com/repos/hadley/15-state-of-the-union/tags",
#>     "blobs_url": "https://api.github.com/repos/hadley/15-state-of-the-union/git/blobs{/sha}",
#>     "git_tags_url": "https://api.github.com/repos/hadley/15-state-of-the-union/git/tags{/sha}",
#>     "git_refs_url": "https://api.github.com/repos/hadley/15-state-of-the-union/git/refs{/sha}",
#>     "trees_url": "https://api.github.com/repos/hadley/15-state-of-the-union/git/trees{/sha}",
#>     "statuses_url": "https://api.github.com/repos/hadley/15-state-of-the-union/statuses/{sha}",
#>     "languages_url": "https://api.github.com/repos/hadley/15-state-of-the-union/languages",
#>     "stargazers_url": "https://api.github.com/repos/hadley/15-state-of-the-union/stargazers",
#>     "contributors_url": "https://api.github.com/repos/hadley/15-state-of-the-union/contributors",
#>     "subscribers_url": "https://api.github.com/repos/hadley/15-state-of-the-union/subscribers",
#>     "subscription_url": "https://api.github.com/repos/hadley/15-state-of-the-union/subscription",
#>     "commits_url": "https://api.github.com/repos/hadley/15-state-of-the-union/commits{/sha}",
#>     "git_commits_url": "https://api.github.com/repos/hadley/15-state-of-the-union/git/commits{/sha}",
#>     "comments_url": "https://api.github.com/repos/hadley/15-state-of-the-union/comments{/number}",
#>     "issue_comment_url": "https://api.github.com/repos/hadley/15-state-of-the-union/issues/comments{/number}",
#>     "contents_url": "https://api.github.com/repos/hadley/15-state-of-the-union/contents/{+path}",
#>     "compare_url": "https://api.github.com/repos/hadley/15-state-of-the-union/compare/{base}...{head}",
#>     "merges_url": "https://api.github.com/repos/hadley/15-state-of-the-union/merges",
#>     "archive_url": "https://api.github.com/repos/hadley/15-state-of-the-union/{archive_format}{/ref}",
#>     "downloads_url": "https://api.github.com/repos/hadley/15-state-of-the-union/downloads",
#>     "issues_url": "https://api.github.com/repos/hadley/15-state-of-the-union/issues{/number}",
#>     "pulls_url": "https://api.github.com/repos/hadley/15-state-of-the-union/pulls{/number}",
#>     "milestones_url": "https://api.github.com/repos/hadley/15-state-of-the-union/milestones{/number}",
#>     "notifications_url": "https://api.github.com/repos/hadley/15-state-of-the-union/notifications{?since,all,participating}",
#>     "labels_url": "https://api.github.com/repos/hadley/15-state-of-the-union/labels{/name}",
#>     "releases_url": "https://api.github.com/repos/hadley/15-state-of-the-union/releases{/id}",
#>     "deployments_url": "https://api.github.com/repos/hadley/15-state-of-the-union/deployments",
#>     "created_at": "2015-08-09T03:22:26Z",
#>     "updated_at": "2022-12-31T01:27:52Z",
#>     "pushed_at": "2015-08-10T20:29:10Z",
#>     "git_url": "git://github.com/hadley/15-state-of-the-union.git",
#>     "ssh_url": "git@github.com:hadley/15-state-of-the-union.git",
#>     "clone_url": "https://github.com/hadley/15-state-of-the-union.git",
#>     "svn_url": "https://github.com/hadley/15-state-of-the-union",
#>     "homepage": {},
#>     "size": 4519,
#>     "stargazers_count": 22,
#>     "watchers_count": 22,
#>     "language": "R",
#>     "has_issues": true,
#>     "has_projects": true,
#>     "has_downloads": true,
#>     "has_wiki": true,
#>     "has_pages": false,
#>     "has_discussions": false,
#>     "forks_count": 7,
#>     "mirror_url": {},
#>     "archived": false,
#>     "disabled": false,
#>     "open_issues_count": 0,
#>     "license": {},
#>     "allow_forking": true,
#>     "is_template": false,
#>     "web_commit_signoff_required": false,
#>     "topics": [],
#>     "visibility": "public",
#>     "forks": 7,
#>     "open_issues": 0,
#>     "watchers": 22,
#>     "default_branch": "master",
#>     "permissions": {
#>       "admin": false,
#>       "maintain": false,
#>       "push": false,
#>       "triage": false,
#>       "pull": false
#>     }
#>   },
#>   {
#>     "id": 40544418,
#>     "node_id": "MDEwOlJlcG9zaXRvcnk0MDU0NDQxOA==",
#>     "name": "15-student-papers",
#>     "full_name": "hadley/15-student-papers",
#>     "private": false,
#>     "owner": {
#>       "login": "hadley",
#>       "id": 4196,
#>       "node_id": "MDQ6VXNlcjQxOTY=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/4196?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/hadley",
#>       "html_url": "https://github.com/hadley",
#>       "followers_url": "https://api.github.com/users/hadley/followers",
#>       "following_url": "https://api.github.com/users/hadley/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/hadley/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/hadley/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/hadley/subscriptions",
#>       "organizations_url": "https://api.github.com/users/hadley/orgs",
#>       "repos_url": "https://api.github.com/users/hadley/repos",
#>       "events_url": "https://api.github.com/users/hadley/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/hadley/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "html_url": "https://github.com/hadley/15-student-papers",
#>     "description": "Graphics & computing student paper winners @ JSM 2015",
#>     "fork": false,
#>     "url": "https://api.github.com/repos/hadley/15-student-papers",
#>     "forks_url": "https://api.github.com/repos/hadley/15-student-papers/forks",
#>     "keys_url": "https://api.github.com/repos/hadley/15-student-papers/keys{/key_id}",
#>     "collaborators_url": "https://api.github.com/repos/hadley/15-student-papers/collaborators{/collaborator}",
#>     "teams_url": "https://api.github.com/repos/hadley/15-student-papers/teams",
#>     "hooks_url": "https://api.github.com/repos/hadley/15-student-papers/hooks",
#>     "issue_events_url": "https://api.github.com/repos/hadley/15-student-papers/issues/events{/number}",
#>     "events_url": "https://api.github.com/repos/hadley/15-student-papers/events",
#>     "assignees_url": "https://api.github.com/repos/hadley/15-student-papers/assignees{/user}",
#>     "branches_url": "https://api.github.com/repos/hadley/15-student-papers/branches{/branch}",
#>     "tags_url": "https://api.github.com/repos/hadley/15-student-papers/tags",
#>     "blobs_url": "https://api.github.com/repos/hadley/15-student-papers/git/blobs{/sha}",
#>     "git_tags_url": "https://api.github.com/repos/hadley/15-student-papers/git/tags{/sha}",
#>     "git_refs_url": "https://api.github.com/repos/hadley/15-student-papers/git/refs{/sha}",
#>     "trees_url": "https://api.github.com/repos/hadley/15-student-papers/git/trees{/sha}",
#>     "statuses_url": "https://api.github.com/repos/hadley/15-student-papers/statuses/{sha}",
#>     "languages_url": "https://api.github.com/repos/hadley/15-student-papers/languages",
#>     "stargazers_url": "https://api.github.com/repos/hadley/15-student-papers/stargazers",
#>     "contributors_url": "https://api.github.com/repos/hadley/15-student-papers/contributors",
#>     "subscribers_url": "https://api.github.com/repos/hadley/15-student-papers/subscribers",
#>     "subscription_url": "https://api.github.com/repos/hadley/15-student-papers/subscription",
#>     "commits_url": "https://api.github.com/repos/hadley/15-student-papers/commits{/sha}",
#>     "git_commits_url": "https://api.github.com/repos/hadley/15-student-papers/git/commits{/sha}",
#>     "comments_url": "https://api.github.com/repos/hadley/15-student-papers/comments{/number}",
#>     "issue_comment_url": "https://api.github.com/repos/hadley/15-student-papers/issues/comments{/number}",
#>     "contents_url": "https://api.github.com/repos/hadley/15-student-papers/contents/{+path}",
#>     "compare_url": "https://api.github.com/repos/hadley/15-student-papers/compare/{base}...{head}",
#>     "merges_url": "https://api.github.com/repos/hadley/15-student-papers/merges",
#>     "archive_url": "https://api.github.com/repos/hadley/15-student-papers/{archive_format}{/ref}",
#>     "downloads_url": "https://api.github.com/repos/hadley/15-student-papers/downloads",
#>     "issues_url": "https://api.github.com/repos/hadley/15-student-papers/issues{/number}",
#>     "pulls_url": "https://api.github.com/repos/hadley/15-student-papers/pulls{/number}",
#>     "milestones_url": "https://api.github.com/repos/hadley/15-student-papers/milestones{/number}",
#>     "notifications_url": "https://api.github.com/repos/hadley/15-student-papers/notifications{?since,all,participating}",
#>     "labels_url": "https://api.github.com/repos/hadley/15-student-papers/labels{/name}",
#>     "releases_url": "https://api.github.com/repos/hadley/15-student-papers/releases{/id}",
#>     "deployments_url": "https://api.github.com/repos/hadley/15-student-papers/deployments",
#>     "created_at": "2015-08-11T13:51:29Z",
#>     "updated_at": "2019-08-18T16:49:40Z",
#>     "pushed_at": "2015-08-21T15:27:51Z",
#>     "git_url": "git://github.com/hadley/15-student-papers.git",
#>     "ssh_url": "git@github.com:hadley/15-student-papers.git",
#>     "clone_url": "https://github.com/hadley/15-student-papers.git",
#>     "svn_url": "https://github.com/hadley/15-student-papers",
#>     "homepage": {},
#>     "size": 2956,
#>     "stargazers_count": 14,
#>     "watchers_count": 14,
#>     "language": "R",
#>     "has_issues": true,
#>     "has_projects": true,
#>     "has_downloads": true,
#>     "has_wiki": true,
#>     "has_pages": false,
#>     "has_discussions": false,
#>     "forks_count": 0,
#>     "mirror_url": {},
#>     "archived": false,
#>     "disabled": false,
#>     "open_issues_count": 0,
#>     "license": {},
#>     "allow_forking": true,
#>     "is_template": false,
#>     "web_commit_signoff_required": false,
#>     "topics": [],
#>     "visibility": "public",
#>     "forks": 0,
#>     "open_issues": 0,
#>     "watchers": 14,
#>     "default_branch": "master",
#>     "permissions": {
#>       "admin": false,
#>       "maintain": false,
#>       "push": false,
#>       "triage": false,
#>       "pull": false
#>     }
#>   }
#> ] 
gh("/users/{username}/repos", username = "hadley", .limit = 2)
#> [
#>   {
#>     "id": 40423928,
#>     "node_id": "MDEwOlJlcG9zaXRvcnk0MDQyMzkyOA==",
#>     "name": "15-state-of-the-union",
#>     "full_name": "hadley/15-state-of-the-union",
#>     "private": false,
#>     "owner": {
#>       "login": "hadley",
#>       "id": 4196,
#>       "node_id": "MDQ6VXNlcjQxOTY=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/4196?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/hadley",
#>       "html_url": "https://github.com/hadley",
#>       "followers_url": "https://api.github.com/users/hadley/followers",
#>       "following_url": "https://api.github.com/users/hadley/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/hadley/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/hadley/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/hadley/subscriptions",
#>       "organizations_url": "https://api.github.com/users/hadley/orgs",
#>       "repos_url": "https://api.github.com/users/hadley/repos",
#>       "events_url": "https://api.github.com/users/hadley/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/hadley/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "html_url": "https://github.com/hadley/15-state-of-the-union",
#>     "description": {},
#>     "fork": false,
#>     "url": "https://api.github.com/repos/hadley/15-state-of-the-union",
#>     "forks_url": "https://api.github.com/repos/hadley/15-state-of-the-union/forks",
#>     "keys_url": "https://api.github.com/repos/hadley/15-state-of-the-union/keys{/key_id}",
#>     "collaborators_url": "https://api.github.com/repos/hadley/15-state-of-the-union/collaborators{/collaborator}",
#>     "teams_url": "https://api.github.com/repos/hadley/15-state-of-the-union/teams",
#>     "hooks_url": "https://api.github.com/repos/hadley/15-state-of-the-union/hooks",
#>     "issue_events_url": "https://api.github.com/repos/hadley/15-state-of-the-union/issues/events{/number}",
#>     "events_url": "https://api.github.com/repos/hadley/15-state-of-the-union/events",
#>     "assignees_url": "https://api.github.com/repos/hadley/15-state-of-the-union/assignees{/user}",
#>     "branches_url": "https://api.github.com/repos/hadley/15-state-of-the-union/branches{/branch}",
#>     "tags_url": "https://api.github.com/repos/hadley/15-state-of-the-union/tags",
#>     "blobs_url": "https://api.github.com/repos/hadley/15-state-of-the-union/git/blobs{/sha}",
#>     "git_tags_url": "https://api.github.com/repos/hadley/15-state-of-the-union/git/tags{/sha}",
#>     "git_refs_url": "https://api.github.com/repos/hadley/15-state-of-the-union/git/refs{/sha}",
#>     "trees_url": "https://api.github.com/repos/hadley/15-state-of-the-union/git/trees{/sha}",
#>     "statuses_url": "https://api.github.com/repos/hadley/15-state-of-the-union/statuses/{sha}",
#>     "languages_url": "https://api.github.com/repos/hadley/15-state-of-the-union/languages",
#>     "stargazers_url": "https://api.github.com/repos/hadley/15-state-of-the-union/stargazers",
#>     "contributors_url": "https://api.github.com/repos/hadley/15-state-of-the-union/contributors",
#>     "subscribers_url": "https://api.github.com/repos/hadley/15-state-of-the-union/subscribers",
#>     "subscription_url": "https://api.github.com/repos/hadley/15-state-of-the-union/subscription",
#>     "commits_url": "https://api.github.com/repos/hadley/15-state-of-the-union/commits{/sha}",
#>     "git_commits_url": "https://api.github.com/repos/hadley/15-state-of-the-union/git/commits{/sha}",
#>     "comments_url": "https://api.github.com/repos/hadley/15-state-of-the-union/comments{/number}",
#>     "issue_comment_url": "https://api.github.com/repos/hadley/15-state-of-the-union/issues/comments{/number}",
#>     "contents_url": "https://api.github.com/repos/hadley/15-state-of-the-union/contents/{+path}",
#>     "compare_url": "https://api.github.com/repos/hadley/15-state-of-the-union/compare/{base}...{head}",
#>     "merges_url": "https://api.github.com/repos/hadley/15-state-of-the-union/merges",
#>     "archive_url": "https://api.github.com/repos/hadley/15-state-of-the-union/{archive_format}{/ref}",
#>     "downloads_url": "https://api.github.com/repos/hadley/15-state-of-the-union/downloads",
#>     "issues_url": "https://api.github.com/repos/hadley/15-state-of-the-union/issues{/number}",
#>     "pulls_url": "https://api.github.com/repos/hadley/15-state-of-the-union/pulls{/number}",
#>     "milestones_url": "https://api.github.com/repos/hadley/15-state-of-the-union/milestones{/number}",
#>     "notifications_url": "https://api.github.com/repos/hadley/15-state-of-the-union/notifications{?since,all,participating}",
#>     "labels_url": "https://api.github.com/repos/hadley/15-state-of-the-union/labels{/name}",
#>     "releases_url": "https://api.github.com/repos/hadley/15-state-of-the-union/releases{/id}",
#>     "deployments_url": "https://api.github.com/repos/hadley/15-state-of-the-union/deployments",
#>     "created_at": "2015-08-09T03:22:26Z",
#>     "updated_at": "2022-12-31T01:27:52Z",
#>     "pushed_at": "2015-08-10T20:29:10Z",
#>     "git_url": "git://github.com/hadley/15-state-of-the-union.git",
#>     "ssh_url": "git@github.com:hadley/15-state-of-the-union.git",
#>     "clone_url": "https://github.com/hadley/15-state-of-the-union.git",
#>     "svn_url": "https://github.com/hadley/15-state-of-the-union",
#>     "homepage": {},
#>     "size": 4519,
#>     "stargazers_count": 22,
#>     "watchers_count": 22,
#>     "language": "R",
#>     "has_issues": true,
#>     "has_projects": true,
#>     "has_downloads": true,
#>     "has_wiki": true,
#>     "has_pages": false,
#>     "has_discussions": false,
#>     "forks_count": 7,
#>     "mirror_url": {},
#>     "archived": false,
#>     "disabled": false,
#>     "open_issues_count": 0,
#>     "license": {},
#>     "allow_forking": true,
#>     "is_template": false,
#>     "web_commit_signoff_required": false,
#>     "topics": [],
#>     "visibility": "public",
#>     "forks": 7,
#>     "open_issues": 0,
#>     "watchers": 22,
#>     "default_branch": "master",
#>     "permissions": {
#>       "admin": false,
#>       "maintain": false,
#>       "push": false,
#>       "triage": false,
#>       "pull": false
#>     }
#>   },
#>   {
#>     "id": 40544418,
#>     "node_id": "MDEwOlJlcG9zaXRvcnk0MDU0NDQxOA==",
#>     "name": "15-student-papers",
#>     "full_name": "hadley/15-student-papers",
#>     "private": false,
#>     "owner": {
#>       "login": "hadley",
#>       "id": 4196,
#>       "node_id": "MDQ6VXNlcjQxOTY=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/4196?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/hadley",
#>       "html_url": "https://github.com/hadley",
#>       "followers_url": "https://api.github.com/users/hadley/followers",
#>       "following_url": "https://api.github.com/users/hadley/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/hadley/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/hadley/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/hadley/subscriptions",
#>       "organizations_url": "https://api.github.com/users/hadley/orgs",
#>       "repos_url": "https://api.github.com/users/hadley/repos",
#>       "events_url": "https://api.github.com/users/hadley/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/hadley/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "html_url": "https://github.com/hadley/15-student-papers",
#>     "description": "Graphics & computing student paper winners @ JSM 2015",
#>     "fork": false,
#>     "url": "https://api.github.com/repos/hadley/15-student-papers",
#>     "forks_url": "https://api.github.com/repos/hadley/15-student-papers/forks",
#>     "keys_url": "https://api.github.com/repos/hadley/15-student-papers/keys{/key_id}",
#>     "collaborators_url": "https://api.github.com/repos/hadley/15-student-papers/collaborators{/collaborator}",
#>     "teams_url": "https://api.github.com/repos/hadley/15-student-papers/teams",
#>     "hooks_url": "https://api.github.com/repos/hadley/15-student-papers/hooks",
#>     "issue_events_url": "https://api.github.com/repos/hadley/15-student-papers/issues/events{/number}",
#>     "events_url": "https://api.github.com/repos/hadley/15-student-papers/events",
#>     "assignees_url": "https://api.github.com/repos/hadley/15-student-papers/assignees{/user}",
#>     "branches_url": "https://api.github.com/repos/hadley/15-student-papers/branches{/branch}",
#>     "tags_url": "https://api.github.com/repos/hadley/15-student-papers/tags",
#>     "blobs_url": "https://api.github.com/repos/hadley/15-student-papers/git/blobs{/sha}",
#>     "git_tags_url": "https://api.github.com/repos/hadley/15-student-papers/git/tags{/sha}",
#>     "git_refs_url": "https://api.github.com/repos/hadley/15-student-papers/git/refs{/sha}",
#>     "trees_url": "https://api.github.com/repos/hadley/15-student-papers/git/trees{/sha}",
#>     "statuses_url": "https://api.github.com/repos/hadley/15-student-papers/statuses/{sha}",
#>     "languages_url": "https://api.github.com/repos/hadley/15-student-papers/languages",
#>     "stargazers_url": "https://api.github.com/repos/hadley/15-student-papers/stargazers",
#>     "contributors_url": "https://api.github.com/repos/hadley/15-student-papers/contributors",
#>     "subscribers_url": "https://api.github.com/repos/hadley/15-student-papers/subscribers",
#>     "subscription_url": "https://api.github.com/repos/hadley/15-student-papers/subscription",
#>     "commits_url": "https://api.github.com/repos/hadley/15-student-papers/commits{/sha}",
#>     "git_commits_url": "https://api.github.com/repos/hadley/15-student-papers/git/commits{/sha}",
#>     "comments_url": "https://api.github.com/repos/hadley/15-student-papers/comments{/number}",
#>     "issue_comment_url": "https://api.github.com/repos/hadley/15-student-papers/issues/comments{/number}",
#>     "contents_url": "https://api.github.com/repos/hadley/15-student-papers/contents/{+path}",
#>     "compare_url": "https://api.github.com/repos/hadley/15-student-papers/compare/{base}...{head}",
#>     "merges_url": "https://api.github.com/repos/hadley/15-student-papers/merges",
#>     "archive_url": "https://api.github.com/repos/hadley/15-student-papers/{archive_format}{/ref}",
#>     "downloads_url": "https://api.github.com/repos/hadley/15-student-papers/downloads",
#>     "issues_url": "https://api.github.com/repos/hadley/15-student-papers/issues{/number}",
#>     "pulls_url": "https://api.github.com/repos/hadley/15-student-papers/pulls{/number}",
#>     "milestones_url": "https://api.github.com/repos/hadley/15-student-papers/milestones{/number}",
#>     "notifications_url": "https://api.github.com/repos/hadley/15-student-papers/notifications{?since,all,participating}",
#>     "labels_url": "https://api.github.com/repos/hadley/15-student-papers/labels{/name}",
#>     "releases_url": "https://api.github.com/repos/hadley/15-student-papers/releases{/id}",
#>     "deployments_url": "https://api.github.com/repos/hadley/15-student-papers/deployments",
#>     "created_at": "2015-08-11T13:51:29Z",
#>     "updated_at": "2019-08-18T16:49:40Z",
#>     "pushed_at": "2015-08-21T15:27:51Z",
#>     "git_url": "git://github.com/hadley/15-student-papers.git",
#>     "ssh_url": "git@github.com:hadley/15-student-papers.git",
#>     "clone_url": "https://github.com/hadley/15-student-papers.git",
#>     "svn_url": "https://github.com/hadley/15-student-papers",
#>     "homepage": {},
#>     "size": 2956,
#>     "stargazers_count": 14,
#>     "watchers_count": 14,
#>     "language": "R",
#>     "has_issues": true,
#>     "has_projects": true,
#>     "has_downloads": true,
#>     "has_wiki": true,
#>     "has_pages": false,
#>     "has_discussions": false,
#>     "forks_count": 0,
#>     "mirror_url": {},
#>     "archived": false,
#>     "disabled": false,
#>     "open_issues_count": 0,
#>     "license": {},
#>     "allow_forking": true,
#>     "is_template": false,
#>     "web_commit_signoff_required": false,
#>     "topics": [],
#>     "visibility": "public",
#>     "forks": 0,
#>     "open_issues": 0,
#>     "watchers": 14,
#>     "default_branch": "master",
#>     "permissions": {
#>       "admin": false,
#>       "maintain": false,
#>       "push": false,
#>       "triage": false,
#>       "pull": false
#>     }
#>   }
#> ] 

## Starred repositories of a user
gh("/users/hadley/starred", .limit = 2)
#> [
#>   {
#>     "id": 390115983,
#>     "node_id": "MDEwOlJlcG9zaXRvcnkzOTAxMTU5ODM=",
#>     "name": "py-shiny",
#>     "full_name": "posit-dev/py-shiny",
#>     "private": false,
#>     "owner": {
#>       "login": "posit-dev",
#>       "id": 107264312,
#>       "node_id": "O_kgDOBmS5OA",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/107264312?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/posit-dev",
#>       "html_url": "https://github.com/posit-dev",
#>       "followers_url": "https://api.github.com/users/posit-dev/followers",
#>       "following_url": "https://api.github.com/users/posit-dev/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/posit-dev/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/posit-dev/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/posit-dev/subscriptions",
#>       "organizations_url": "https://api.github.com/users/posit-dev/orgs",
#>       "repos_url": "https://api.github.com/users/posit-dev/repos",
#>       "events_url": "https://api.github.com/users/posit-dev/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/posit-dev/received_events",
#>       "type": "Organization",
#>       "site_admin": false
#>     },
#>     "html_url": "https://github.com/posit-dev/py-shiny",
#>     "description": "Shiny for Python",
#>     "fork": false,
#>     "url": "https://api.github.com/repos/posit-dev/py-shiny",
#>     "forks_url": "https://api.github.com/repos/posit-dev/py-shiny/forks",
#>     "keys_url": "https://api.github.com/repos/posit-dev/py-shiny/keys{/key_id}",
#>     "collaborators_url": "https://api.github.com/repos/posit-dev/py-shiny/collaborators{/collaborator}",
#>     "teams_url": "https://api.github.com/repos/posit-dev/py-shiny/teams",
#>     "hooks_url": "https://api.github.com/repos/posit-dev/py-shiny/hooks",
#>     "issue_events_url": "https://api.github.com/repos/posit-dev/py-shiny/issues/events{/number}",
#>     "events_url": "https://api.github.com/repos/posit-dev/py-shiny/events",
#>     "assignees_url": "https://api.github.com/repos/posit-dev/py-shiny/assignees{/user}",
#>     "branches_url": "https://api.github.com/repos/posit-dev/py-shiny/branches{/branch}",
#>     "tags_url": "https://api.github.com/repos/posit-dev/py-shiny/tags",
#>     "blobs_url": "https://api.github.com/repos/posit-dev/py-shiny/git/blobs{/sha}",
#>     "git_tags_url": "https://api.github.com/repos/posit-dev/py-shiny/git/tags{/sha}",
#>     "git_refs_url": "https://api.github.com/repos/posit-dev/py-shiny/git/refs{/sha}",
#>     "trees_url": "https://api.github.com/repos/posit-dev/py-shiny/git/trees{/sha}",
#>     "statuses_url": "https://api.github.com/repos/posit-dev/py-shiny/statuses/{sha}",
#>     "languages_url": "https://api.github.com/repos/posit-dev/py-shiny/languages",
#>     "stargazers_url": "https://api.github.com/repos/posit-dev/py-shiny/stargazers",
#>     "contributors_url": "https://api.github.com/repos/posit-dev/py-shiny/contributors",
#>     "subscribers_url": "https://api.github.com/repos/posit-dev/py-shiny/subscribers",
#>     "subscription_url": "https://api.github.com/repos/posit-dev/py-shiny/subscription",
#>     "commits_url": "https://api.github.com/repos/posit-dev/py-shiny/commits{/sha}",
#>     "git_commits_url": "https://api.github.com/repos/posit-dev/py-shiny/git/commits{/sha}",
#>     "comments_url": "https://api.github.com/repos/posit-dev/py-shiny/comments{/number}",
#>     "issue_comment_url": "https://api.github.com/repos/posit-dev/py-shiny/issues/comments{/number}",
#>     "contents_url": "https://api.github.com/repos/posit-dev/py-shiny/contents/{+path}",
#>     "compare_url": "https://api.github.com/repos/posit-dev/py-shiny/compare/{base}...{head}",
#>     "merges_url": "https://api.github.com/repos/posit-dev/py-shiny/merges",
#>     "archive_url": "https://api.github.com/repos/posit-dev/py-shiny/{archive_format}{/ref}",
#>     "downloads_url": "https://api.github.com/repos/posit-dev/py-shiny/downloads",
#>     "issues_url": "https://api.github.com/repos/posit-dev/py-shiny/issues{/number}",
#>     "pulls_url": "https://api.github.com/repos/posit-dev/py-shiny/pulls{/number}",
#>     "milestones_url": "https://api.github.com/repos/posit-dev/py-shiny/milestones{/number}",
#>     "notifications_url": "https://api.github.com/repos/posit-dev/py-shiny/notifications{?since,all,participating}",
#>     "labels_url": "https://api.github.com/repos/posit-dev/py-shiny/labels{/name}",
#>     "releases_url": "https://api.github.com/repos/posit-dev/py-shiny/releases{/id}",
#>     "deployments_url": "https://api.github.com/repos/posit-dev/py-shiny/deployments",
#>     "created_at": "2021-07-27T20:19:49Z",
#>     "updated_at": "2024-03-28T10:46:05Z",
#>     "pushed_at": "2024-03-28T20:14:57Z",
#>     "git_url": "git://github.com/posit-dev/py-shiny.git",
#>     "ssh_url": "git@github.com:posit-dev/py-shiny.git",
#>     "clone_url": "https://github.com/posit-dev/py-shiny.git",
#>     "svn_url": "https://github.com/posit-dev/py-shiny",
#>     "homepage": "https://shiny.posit.co/py/",
#>     "size": 18601,
#>     "stargazers_count": 909,
#>     "watchers_count": 909,
#>     "language": "Python",
#>     "has_issues": true,
#>     "has_projects": true,
#>     "has_downloads": true,
#>     "has_wiki": true,
#>     "has_pages": true,
#>     "has_discussions": true,
#>     "forks_count": 54,
#>     "mirror_url": {},
#>     "archived": false,
#>     "disabled": false,
#>     "open_issues_count": 330,
#>     "license": {
#>       "key": "mit",
#>       "name": "MIT License",
#>       "spdx_id": "MIT",
#>       "url": "https://api.github.com/licenses/mit",
#>       "node_id": "MDc6TGljZW5zZTEz"
#>     },
#>     "allow_forking": true,
#>     "is_template": false,
#>     "web_commit_signoff_required": false,
#>     "topics": [],
#>     "visibility": "public",
#>     "forks": 54,
#>     "open_issues": 330,
#>     "watchers": 909,
#>     "default_branch": "main",
#>     "permissions": {
#>       "admin": false,
#>       "maintain": false,
#>       "push": false,
#>       "triage": false,
#>       "pull": false
#>     }
#>   },
#>   {
#>     "id": 10221246,
#>     "node_id": "MDEwOlJlcG9zaXRvcnkxMDIyMTI0Ng==",
#>     "name": "bigrquery",
#>     "full_name": "r-dbi/bigrquery",
#>     "private": false,
#>     "owner": {
#>       "login": "r-dbi",
#>       "id": 5695665,
#>       "node_id": "MDEyOk9yZ2FuaXphdGlvbjU2OTU2NjU=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/5695665?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/r-dbi",
#>       "html_url": "https://github.com/r-dbi",
#>       "followers_url": "https://api.github.com/users/r-dbi/followers",
#>       "following_url": "https://api.github.com/users/r-dbi/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/r-dbi/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/r-dbi/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/r-dbi/subscriptions",
#>       "organizations_url": "https://api.github.com/users/r-dbi/orgs",
#>       "repos_url": "https://api.github.com/users/r-dbi/repos",
#>       "events_url": "https://api.github.com/users/r-dbi/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/r-dbi/received_events",
#>       "type": "Organization",
#>       "site_admin": false
#>     },
#>     "html_url": "https://github.com/r-dbi/bigrquery",
#>     "description": "An interface to Google's BigQuery from R.",
#>     "fork": false,
#>     "url": "https://api.github.com/repos/r-dbi/bigrquery",
#>     "forks_url": "https://api.github.com/repos/r-dbi/bigrquery/forks",
#>     "keys_url": "https://api.github.com/repos/r-dbi/bigrquery/keys{/key_id}",
#>     "collaborators_url": "https://api.github.com/repos/r-dbi/bigrquery/collaborators{/collaborator}",
#>     "teams_url": "https://api.github.com/repos/r-dbi/bigrquery/teams",
#>     "hooks_url": "https://api.github.com/repos/r-dbi/bigrquery/hooks",
#>     "issue_events_url": "https://api.github.com/repos/r-dbi/bigrquery/issues/events{/number}",
#>     "events_url": "https://api.github.com/repos/r-dbi/bigrquery/events",
#>     "assignees_url": "https://api.github.com/repos/r-dbi/bigrquery/assignees{/user}",
#>     "branches_url": "https://api.github.com/repos/r-dbi/bigrquery/branches{/branch}",
#>     "tags_url": "https://api.github.com/repos/r-dbi/bigrquery/tags",
#>     "blobs_url": "https://api.github.com/repos/r-dbi/bigrquery/git/blobs{/sha}",
#>     "git_tags_url": "https://api.github.com/repos/r-dbi/bigrquery/git/tags{/sha}",
#>     "git_refs_url": "https://api.github.com/repos/r-dbi/bigrquery/git/refs{/sha}",
#>     "trees_url": "https://api.github.com/repos/r-dbi/bigrquery/git/trees{/sha}",
#>     "statuses_url": "https://api.github.com/repos/r-dbi/bigrquery/statuses/{sha}",
#>     "languages_url": "https://api.github.com/repos/r-dbi/bigrquery/languages",
#>     "stargazers_url": "https://api.github.com/repos/r-dbi/bigrquery/stargazers",
#>     "contributors_url": "https://api.github.com/repos/r-dbi/bigrquery/contributors",
#>     "subscribers_url": "https://api.github.com/repos/r-dbi/bigrquery/subscribers",
#>     "subscription_url": "https://api.github.com/repos/r-dbi/bigrquery/subscription",
#>     "commits_url": "https://api.github.com/repos/r-dbi/bigrquery/commits{/sha}",
#>     "git_commits_url": "https://api.github.com/repos/r-dbi/bigrquery/git/commits{/sha}",
#>     "comments_url": "https://api.github.com/repos/r-dbi/bigrquery/comments{/number}",
#>     "issue_comment_url": "https://api.github.com/repos/r-dbi/bigrquery/issues/comments{/number}",
#>     "contents_url": "https://api.github.com/repos/r-dbi/bigrquery/contents/{+path}",
#>     "compare_url": "https://api.github.com/repos/r-dbi/bigrquery/compare/{base}...{head}",
#>     "merges_url": "https://api.github.com/repos/r-dbi/bigrquery/merges",
#>     "archive_url": "https://api.github.com/repos/r-dbi/bigrquery/{archive_format}{/ref}",
#>     "downloads_url": "https://api.github.com/repos/r-dbi/bigrquery/downloads",
#>     "issues_url": "https://api.github.com/repos/r-dbi/bigrquery/issues{/number}",
#>     "pulls_url": "https://api.github.com/repos/r-dbi/bigrquery/pulls{/number}",
#>     "milestones_url": "https://api.github.com/repos/r-dbi/bigrquery/milestones{/number}",
#>     "notifications_url": "https://api.github.com/repos/r-dbi/bigrquery/notifications{?since,all,participating}",
#>     "labels_url": "https://api.github.com/repos/r-dbi/bigrquery/labels{/name}",
#>     "releases_url": "https://api.github.com/repos/r-dbi/bigrquery/releases{/id}",
#>     "deployments_url": "https://api.github.com/repos/r-dbi/bigrquery/deployments",
#>     "created_at": "2013-05-22T14:04:16Z",
#>     "updated_at": "2024-03-26T16:11:20Z",
#>     "pushed_at": "2024-03-14T17:45:18Z",
#>     "git_url": "git://github.com/r-dbi/bigrquery.git",
#>     "ssh_url": "git@github.com:r-dbi/bigrquery.git",
#>     "clone_url": "https://github.com/r-dbi/bigrquery.git",
#>     "svn_url": "https://github.com/r-dbi/bigrquery",
#>     "homepage": "https://bigrquery.r-dbi.org",
#>     "size": 7100,
#>     "stargazers_count": 503,
#>     "watchers_count": 503,
#>     "language": "R",
#>     "has_issues": true,
#>     "has_projects": false,
#>     "has_downloads": true,
#>     "has_wiki": false,
#>     "has_pages": true,
#>     "has_discussions": false,
#>     "forks_count": 179,
#>     "mirror_url": {},
#>     "archived": false,
#>     "disabled": false,
#>     "open_issues_count": 8,
#>     "license": {
#>       "key": "other",
#>       "name": "Other",
#>       "spdx_id": "NOASSERTION",
#>       "url": {},
#>       "node_id": "MDc6TGljZW5zZTA="
#>     },
#>     "allow_forking": true,
#>     "is_template": false,
#>     "web_commit_signoff_required": false,
#>     "topics": [
#>       "bigquery",
#>       "database",
#>       "r"
#>     ],
#>     "visibility": "public",
#>     "forks": 179,
#>     "open_issues": 8,
#>     "watchers": 503,
#>     "default_branch": "main",
#>     "permissions": {
#>       "admin": false,
#>       "maintain": false,
#>       "push": false,
#>       "triage": false,
#>       "pull": false
#>     }
#>   }
#> ] 
gh("/users/{username}/starred", username = "hadley", .limit = 2)
#> [
#>   {
#>     "id": 390115983,
#>     "node_id": "MDEwOlJlcG9zaXRvcnkzOTAxMTU5ODM=",
#>     "name": "py-shiny",
#>     "full_name": "posit-dev/py-shiny",
#>     "private": false,
#>     "owner": {
#>       "login": "posit-dev",
#>       "id": 107264312,
#>       "node_id": "O_kgDOBmS5OA",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/107264312?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/posit-dev",
#>       "html_url": "https://github.com/posit-dev",
#>       "followers_url": "https://api.github.com/users/posit-dev/followers",
#>       "following_url": "https://api.github.com/users/posit-dev/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/posit-dev/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/posit-dev/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/posit-dev/subscriptions",
#>       "organizations_url": "https://api.github.com/users/posit-dev/orgs",
#>       "repos_url": "https://api.github.com/users/posit-dev/repos",
#>       "events_url": "https://api.github.com/users/posit-dev/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/posit-dev/received_events",
#>       "type": "Organization",
#>       "site_admin": false
#>     },
#>     "html_url": "https://github.com/posit-dev/py-shiny",
#>     "description": "Shiny for Python",
#>     "fork": false,
#>     "url": "https://api.github.com/repos/posit-dev/py-shiny",
#>     "forks_url": "https://api.github.com/repos/posit-dev/py-shiny/forks",
#>     "keys_url": "https://api.github.com/repos/posit-dev/py-shiny/keys{/key_id}",
#>     "collaborators_url": "https://api.github.com/repos/posit-dev/py-shiny/collaborators{/collaborator}",
#>     "teams_url": "https://api.github.com/repos/posit-dev/py-shiny/teams",
#>     "hooks_url": "https://api.github.com/repos/posit-dev/py-shiny/hooks",
#>     "issue_events_url": "https://api.github.com/repos/posit-dev/py-shiny/issues/events{/number}",
#>     "events_url": "https://api.github.com/repos/posit-dev/py-shiny/events",
#>     "assignees_url": "https://api.github.com/repos/posit-dev/py-shiny/assignees{/user}",
#>     "branches_url": "https://api.github.com/repos/posit-dev/py-shiny/branches{/branch}",
#>     "tags_url": "https://api.github.com/repos/posit-dev/py-shiny/tags",
#>     "blobs_url": "https://api.github.com/repos/posit-dev/py-shiny/git/blobs{/sha}",
#>     "git_tags_url": "https://api.github.com/repos/posit-dev/py-shiny/git/tags{/sha}",
#>     "git_refs_url": "https://api.github.com/repos/posit-dev/py-shiny/git/refs{/sha}",
#>     "trees_url": "https://api.github.com/repos/posit-dev/py-shiny/git/trees{/sha}",
#>     "statuses_url": "https://api.github.com/repos/posit-dev/py-shiny/statuses/{sha}",
#>     "languages_url": "https://api.github.com/repos/posit-dev/py-shiny/languages",
#>     "stargazers_url": "https://api.github.com/repos/posit-dev/py-shiny/stargazers",
#>     "contributors_url": "https://api.github.com/repos/posit-dev/py-shiny/contributors",
#>     "subscribers_url": "https://api.github.com/repos/posit-dev/py-shiny/subscribers",
#>     "subscription_url": "https://api.github.com/repos/posit-dev/py-shiny/subscription",
#>     "commits_url": "https://api.github.com/repos/posit-dev/py-shiny/commits{/sha}",
#>     "git_commits_url": "https://api.github.com/repos/posit-dev/py-shiny/git/commits{/sha}",
#>     "comments_url": "https://api.github.com/repos/posit-dev/py-shiny/comments{/number}",
#>     "issue_comment_url": "https://api.github.com/repos/posit-dev/py-shiny/issues/comments{/number}",
#>     "contents_url": "https://api.github.com/repos/posit-dev/py-shiny/contents/{+path}",
#>     "compare_url": "https://api.github.com/repos/posit-dev/py-shiny/compare/{base}...{head}",
#>     "merges_url": "https://api.github.com/repos/posit-dev/py-shiny/merges",
#>     "archive_url": "https://api.github.com/repos/posit-dev/py-shiny/{archive_format}{/ref}",
#>     "downloads_url": "https://api.github.com/repos/posit-dev/py-shiny/downloads",
#>     "issues_url": "https://api.github.com/repos/posit-dev/py-shiny/issues{/number}",
#>     "pulls_url": "https://api.github.com/repos/posit-dev/py-shiny/pulls{/number}",
#>     "milestones_url": "https://api.github.com/repos/posit-dev/py-shiny/milestones{/number}",
#>     "notifications_url": "https://api.github.com/repos/posit-dev/py-shiny/notifications{?since,all,participating}",
#>     "labels_url": "https://api.github.com/repos/posit-dev/py-shiny/labels{/name}",
#>     "releases_url": "https://api.github.com/repos/posit-dev/py-shiny/releases{/id}",
#>     "deployments_url": "https://api.github.com/repos/posit-dev/py-shiny/deployments",
#>     "created_at": "2021-07-27T20:19:49Z",
#>     "updated_at": "2024-03-28T10:46:05Z",
#>     "pushed_at": "2024-03-28T20:14:57Z",
#>     "git_url": "git://github.com/posit-dev/py-shiny.git",
#>     "ssh_url": "git@github.com:posit-dev/py-shiny.git",
#>     "clone_url": "https://github.com/posit-dev/py-shiny.git",
#>     "svn_url": "https://github.com/posit-dev/py-shiny",
#>     "homepage": "https://shiny.posit.co/py/",
#>     "size": 18601,
#>     "stargazers_count": 909,
#>     "watchers_count": 909,
#>     "language": "Python",
#>     "has_issues": true,
#>     "has_projects": true,
#>     "has_downloads": true,
#>     "has_wiki": true,
#>     "has_pages": true,
#>     "has_discussions": true,
#>     "forks_count": 54,
#>     "mirror_url": {},
#>     "archived": false,
#>     "disabled": false,
#>     "open_issues_count": 330,
#>     "license": {
#>       "key": "mit",
#>       "name": "MIT License",
#>       "spdx_id": "MIT",
#>       "url": "https://api.github.com/licenses/mit",
#>       "node_id": "MDc6TGljZW5zZTEz"
#>     },
#>     "allow_forking": true,
#>     "is_template": false,
#>     "web_commit_signoff_required": false,
#>     "topics": [],
#>     "visibility": "public",
#>     "forks": 54,
#>     "open_issues": 330,
#>     "watchers": 909,
#>     "default_branch": "main",
#>     "permissions": {
#>       "admin": false,
#>       "maintain": false,
#>       "push": false,
#>       "triage": false,
#>       "pull": false
#>     }
#>   },
#>   {
#>     "id": 10221246,
#>     "node_id": "MDEwOlJlcG9zaXRvcnkxMDIyMTI0Ng==",
#>     "name": "bigrquery",
#>     "full_name": "r-dbi/bigrquery",
#>     "private": false,
#>     "owner": {
#>       "login": "r-dbi",
#>       "id": 5695665,
#>       "node_id": "MDEyOk9yZ2FuaXphdGlvbjU2OTU2NjU=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/5695665?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/r-dbi",
#>       "html_url": "https://github.com/r-dbi",
#>       "followers_url": "https://api.github.com/users/r-dbi/followers",
#>       "following_url": "https://api.github.com/users/r-dbi/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/r-dbi/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/r-dbi/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/r-dbi/subscriptions",
#>       "organizations_url": "https://api.github.com/users/r-dbi/orgs",
#>       "repos_url": "https://api.github.com/users/r-dbi/repos",
#>       "events_url": "https://api.github.com/users/r-dbi/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/r-dbi/received_events",
#>       "type": "Organization",
#>       "site_admin": false
#>     },
#>     "html_url": "https://github.com/r-dbi/bigrquery",
#>     "description": "An interface to Google's BigQuery from R.",
#>     "fork": false,
#>     "url": "https://api.github.com/repos/r-dbi/bigrquery",
#>     "forks_url": "https://api.github.com/repos/r-dbi/bigrquery/forks",
#>     "keys_url": "https://api.github.com/repos/r-dbi/bigrquery/keys{/key_id}",
#>     "collaborators_url": "https://api.github.com/repos/r-dbi/bigrquery/collaborators{/collaborator}",
#>     "teams_url": "https://api.github.com/repos/r-dbi/bigrquery/teams",
#>     "hooks_url": "https://api.github.com/repos/r-dbi/bigrquery/hooks",
#>     "issue_events_url": "https://api.github.com/repos/r-dbi/bigrquery/issues/events{/number}",
#>     "events_url": "https://api.github.com/repos/r-dbi/bigrquery/events",
#>     "assignees_url": "https://api.github.com/repos/r-dbi/bigrquery/assignees{/user}",
#>     "branches_url": "https://api.github.com/repos/r-dbi/bigrquery/branches{/branch}",
#>     "tags_url": "https://api.github.com/repos/r-dbi/bigrquery/tags",
#>     "blobs_url": "https://api.github.com/repos/r-dbi/bigrquery/git/blobs{/sha}",
#>     "git_tags_url": "https://api.github.com/repos/r-dbi/bigrquery/git/tags{/sha}",
#>     "git_refs_url": "https://api.github.com/repos/r-dbi/bigrquery/git/refs{/sha}",
#>     "trees_url": "https://api.github.com/repos/r-dbi/bigrquery/git/trees{/sha}",
#>     "statuses_url": "https://api.github.com/repos/r-dbi/bigrquery/statuses/{sha}",
#>     "languages_url": "https://api.github.com/repos/r-dbi/bigrquery/languages",
#>     "stargazers_url": "https://api.github.com/repos/r-dbi/bigrquery/stargazers",
#>     "contributors_url": "https://api.github.com/repos/r-dbi/bigrquery/contributors",
#>     "subscribers_url": "https://api.github.com/repos/r-dbi/bigrquery/subscribers",
#>     "subscription_url": "https://api.github.com/repos/r-dbi/bigrquery/subscription",
#>     "commits_url": "https://api.github.com/repos/r-dbi/bigrquery/commits{/sha}",
#>     "git_commits_url": "https://api.github.com/repos/r-dbi/bigrquery/git/commits{/sha}",
#>     "comments_url": "https://api.github.com/repos/r-dbi/bigrquery/comments{/number}",
#>     "issue_comment_url": "https://api.github.com/repos/r-dbi/bigrquery/issues/comments{/number}",
#>     "contents_url": "https://api.github.com/repos/r-dbi/bigrquery/contents/{+path}",
#>     "compare_url": "https://api.github.com/repos/r-dbi/bigrquery/compare/{base}...{head}",
#>     "merges_url": "https://api.github.com/repos/r-dbi/bigrquery/merges",
#>     "archive_url": "https://api.github.com/repos/r-dbi/bigrquery/{archive_format}{/ref}",
#>     "downloads_url": "https://api.github.com/repos/r-dbi/bigrquery/downloads",
#>     "issues_url": "https://api.github.com/repos/r-dbi/bigrquery/issues{/number}",
#>     "pulls_url": "https://api.github.com/repos/r-dbi/bigrquery/pulls{/number}",
#>     "milestones_url": "https://api.github.com/repos/r-dbi/bigrquery/milestones{/number}",
#>     "notifications_url": "https://api.github.com/repos/r-dbi/bigrquery/notifications{?since,all,participating}",
#>     "labels_url": "https://api.github.com/repos/r-dbi/bigrquery/labels{/name}",
#>     "releases_url": "https://api.github.com/repos/r-dbi/bigrquery/releases{/id}",
#>     "deployments_url": "https://api.github.com/repos/r-dbi/bigrquery/deployments",
#>     "created_at": "2013-05-22T14:04:16Z",
#>     "updated_at": "2024-03-26T16:11:20Z",
#>     "pushed_at": "2024-03-14T17:45:18Z",
#>     "git_url": "git://github.com/r-dbi/bigrquery.git",
#>     "ssh_url": "git@github.com:r-dbi/bigrquery.git",
#>     "clone_url": "https://github.com/r-dbi/bigrquery.git",
#>     "svn_url": "https://github.com/r-dbi/bigrquery",
#>     "homepage": "https://bigrquery.r-dbi.org",
#>     "size": 7100,
#>     "stargazers_count": 503,
#>     "watchers_count": 503,
#>     "language": "R",
#>     "has_issues": true,
#>     "has_projects": false,
#>     "has_downloads": true,
#>     "has_wiki": false,
#>     "has_pages": true,
#>     "has_discussions": false,
#>     "forks_count": 179,
#>     "mirror_url": {},
#>     "archived": false,
#>     "disabled": false,
#>     "open_issues_count": 8,
#>     "license": {
#>       "key": "other",
#>       "name": "Other",
#>       "spdx_id": "NOASSERTION",
#>       "url": {},
#>       "node_id": "MDc6TGljZW5zZTA="
#>     },
#>     "allow_forking": true,
#>     "is_template": false,
#>     "web_commit_signoff_required": false,
#>     "topics": [
#>       "bigquery",
#>       "database",
#>       "r"
#>     ],
#>     "visibility": "public",
#>     "forks": 179,
#>     "open_issues": 8,
#>     "watchers": 503,
#>     "default_branch": "main",
#>     "permissions": {
#>       "admin": false,
#>       "maintain": false,
#>       "push": false,
#>       "triage": false,
#>       "pull": false
#>     }
#>   }
#> ] 
if (FALSE) {
## Create a repository, needs a token in GITHUB_PAT (or GITHUB_TOKEN)
## environment variable
gh("POST /user/repos", name = "foobar")
}
## Issues of a repository
gh("/repos/hadley/dplyr/issues")
#> [
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/7006",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7006/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7006/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7006/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/7006",
#>     "id": 2213499488,
#>     "node_id": "I_kwDOAGIUpc6D71Jg",
#>     "number": 7006,
#>     "title": "Clarity of \"duplicated\" error message in `rename_with()`",
#>     "user": {
#>       "login": "DanChaltiel",
#>       "id": 15105152,
#>       "node_id": "MDQ6VXNlcjE1MTA1MTUy",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/15105152?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/DanChaltiel",
#>       "html_url": "https://github.com/DanChaltiel",
#>       "followers_url": "https://api.github.com/users/DanChaltiel/followers",
#>       "following_url": "https://api.github.com/users/DanChaltiel/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/DanChaltiel/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/DanChaltiel/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/DanChaltiel/subscriptions",
#>       "organizations_url": "https://api.github.com/users/DanChaltiel/orgs",
#>       "repos_url": "https://api.github.com/users/DanChaltiel/repos",
#>       "events_url": "https://api.github.com/users/DanChaltiel/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/DanChaltiel/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 0,
#>     "created_at": "2024-03-28T15:19:35Z",
#>     "updated_at": "2024-03-28T15:19:35Z",
#>     "closed_at": {},
#>     "author_association": "CONTRIBUTOR",
#>     "active_lock_reason": {},
#>     "body": "Hi,  \r\n\r\nWhen using `rename_with()` and ending with duplicated column names, the error message tells us about the transformed, duplicated name and the location of the original columns.\r\n\r\nHowever, it would be much clearer to have the original column names in the error message.\r\n\r\nThe locations are not of much help if `rename_with()` is used in a long pipeline, nor is the transformed name if the function is not well described.\r\n\r\nHere is an example case:\r\n\r\n``` r\r\nlibrary(tidyverse)\r\nletter_sum = function(x){\r\n  x %>% map_chr(~{str_split_1(.x, \"\") %>% map_int(~which(letters==tolower(.x))) %>% sum() %>% as.character()})\r\n}\r\nmtcars %>% rename_with(letter_sum)\r\n#> Error in `rename_with()`:\r\n#> ! Names must be unique.\r\n#> x These names are duplicated:\r\n#>   * \"24\" at locations 4 and 11.\r\n#>   * \"43\" at locations 5 and 6.\r\n```\r\n\r\n<sup>Created on 2024-03-28 with [reprex v2.1.0](https://reprex.tidyverse.org)<\/sup>\r\n\r\nWhile I admit the transformation is exaggeratedly nonsensical, it shows that the error is not very useful in such cases.\r\n",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/7006/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7006/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/7004",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7004/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7004/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7004/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/7004",
#>     "id": 2190838274,
#>     "node_id": "I_kwDOAGIUpc6ClYoC",
#>     "number": 7004,
#>     "title": "dplyr 1.1.4 breaks on empty dataframes constructed from matrices",
#>     "user": {
#>       "login": "john-b-edwards",
#>       "id": 9289685,
#>       "node_id": "MDQ6VXNlcjkyODk2ODU=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/9289685?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/john-b-edwards",
#>       "html_url": "https://github.com/john-b-edwards",
#>       "followers_url": "https://api.github.com/users/john-b-edwards/followers",
#>       "following_url": "https://api.github.com/users/john-b-edwards/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/john-b-edwards/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/john-b-edwards/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/john-b-edwards/subscriptions",
#>       "organizations_url": "https://api.github.com/users/john-b-edwards/orgs",
#>       "repos_url": "https://api.github.com/users/john-b-edwards/repos",
#>       "events_url": "https://api.github.com/users/john-b-edwards/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/john-b-edwards/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 1,
#>     "created_at": "2024-03-17T19:55:39Z",
#>     "updated_at": "2024-03-21T19:01:45Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "Previous versions of dplyr would allow you to manipulate empty dataframes that had been constructed from empty matrices, e.g.\r\n\r\n```r\r\npackageurl <- \"https://cran.r-project.org/src/contrib/Archive/dplyr/dplyr_1.1.3.tar.gz\"\r\ninstall.packages(packageurl, repos=NULL, type=\"source\")\r\n#> Installing package into 'C:/Users/edwar/Documents/R/win-library/4.1'\r\n#> (as 'lib' is unspecified)\r\npackageVersion('dplyr')\r\n#> [1] '1.1.3'\r\nas.data.frame(matrix(nrow = 0, ncol = 0)) |> dplyr::slice(1)\r\n#> data frame with 0 columns and 0 rows\r\n```\r\n\r\nIn dplyr 1.1.4, this code causes an internal error:\r\n\r\n```r\r\npackageurl <- \"https://cran.r-project.org/src/contrib/dplyr_1.1.4.tar.gz\"\r\ninstall.packages(packageurl, repos=NULL, type=\"source\")\r\n#> Installing package into 'C:/Users/edwar/Documents/R/win-library/4.1'\r\n#> (as 'lib' is unspecified)\r\npackageVersion('dplyr')\r\n#> [1] '1.1.4'\r\nas.data.frame(matrix(nrow = 0, ncol = 0)) |> dplyr::slice(1)\r\n#> Error: Internal error: `template` must have a `names` attribute.\r\n```\r\n\r\nBoth versions are able to reliably manipulate empty dataframes that were not constructed from matrices (e.g. `data.frame() |> dplyr::slice(1)` works just fine).",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/7004/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7004/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/7002",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7002/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7002/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7002/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/pull/7002",
#>     "id": 2180947521,
#>     "node_id": "PR_kwDOAGIUpc5pV2Vm",
#>     "number": 7002,
#>     "title": "Update snapshots for tidyselect 1.2.1",
#>     "user": {
#>       "login": "lionel-",
#>       "id": 4465050,
#>       "node_id": "MDQ6VXNlcjQ0NjUwNTA=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/4465050?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/lionel-",
#>       "html_url": "https://github.com/lionel-",
#>       "followers_url": "https://api.github.com/users/lionel-/followers",
#>       "following_url": "https://api.github.com/users/lionel-/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/lionel-/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/lionel-/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/lionel-/subscriptions",
#>       "organizations_url": "https://api.github.com/users/lionel-/orgs",
#>       "repos_url": "https://api.github.com/users/lionel-/repos",
#>       "events_url": "https://api.github.com/users/lionel-/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/lionel-/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 1,
#>     "created_at": "2024-03-12T07:48:43Z",
#>     "updated_at": "2024-03-12T08:03:58Z",
#>     "closed_at": {},
#>     "author_association": "MEMBER",
#>     "active_lock_reason": {},
#>     "draft": false,
#>     "pull_request": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/pulls/7002",
#>       "html_url": "https://github.com/tidyverse/dplyr/pull/7002",
#>       "diff_url": "https://github.com/tidyverse/dplyr/pull/7002.diff",
#>       "patch_url": "https://github.com/tidyverse/dplyr/pull/7002.patch",
#>       "merged_at": {}
#>     },
#>     "body": "For:\r\n\r\n- https://github.com/r-lib/tidyselect/pull/326\r\n- https://github.com/r-lib/tidyselect/commit/1822141ae972ee23a2f307855583f9728bac3a8e",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/7002/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7002/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/7001",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7001/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7001/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7001/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/7001",
#>     "id": 2175247275,
#>     "node_id": "I_kwDOAGIUpc6Bp6Or",
#>     "number": 7001,
#>     "title": "Internal: slightly inaccurate `as_join_by()` implementation for character",
#>     "user": {
#>       "login": "krlmlr",
#>       "id": 1741643,
#>       "node_id": "MDQ6VXNlcjE3NDE2NDM=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/1741643?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/krlmlr",
#>       "html_url": "https://github.com/krlmlr",
#>       "followers_url": "https://api.github.com/users/krlmlr/followers",
#>       "following_url": "https://api.github.com/users/krlmlr/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/krlmlr/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/krlmlr/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/krlmlr/subscriptions",
#>       "organizations_url": "https://api.github.com/users/krlmlr/orgs",
#>       "repos_url": "https://api.github.com/users/krlmlr/repos",
#>       "events_url": "https://api.github.com/users/krlmlr/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/krlmlr/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 8,
#>     "created_at": "2024-03-08T04:15:19Z",
#>     "updated_at": "2024-03-22T07:56:02Z",
#>     "closed_at": {},
#>     "author_association": "MEMBER",
#>     "active_lock_reason": {},
#>     "body": "``` r\r\nwaldo::compare(dplyr:::as_join_by(\"a\"), dplyr::join_by(a == a))\r\n#> `old$exprs[[1]]`: `\"a\" == \"a\"`\r\n#> `new$exprs[[1]]`: `a == a`\r\n```\r\n\r\n<sup>Created on 2024-03-08 with [reprex v2.1.0](https://reprex.tidyverse.org)<\/sup>\r\n\r\nI can work around, but I wonder if this may cause some downstream gotchas.",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/7001/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7001/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6999",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6999/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6999/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6999/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/pull/6999",
#>     "id": 2173662568,
#>     "node_id": "PR_kwDOAGIUpc5o9Iio",
#>     "number": 6999,
#>     "title": "docs: Improve `?group_by_prepare`",
#>     "user": {
#>       "login": "krlmlr",
#>       "id": 1741643,
#>       "node_id": "MDQ6VXNlcjE3NDE2NDM=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/1741643?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/krlmlr",
#>       "html_url": "https://github.com/krlmlr",
#>       "followers_url": "https://api.github.com/users/krlmlr/followers",
#>       "following_url": "https://api.github.com/users/krlmlr/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/krlmlr/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/krlmlr/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/krlmlr/subscriptions",
#>       "organizations_url": "https://api.github.com/users/krlmlr/orgs",
#>       "repos_url": "https://api.github.com/users/krlmlr/repos",
#>       "events_url": "https://api.github.com/users/krlmlr/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/krlmlr/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 0,
#>     "created_at": "2024-03-07T11:39:47Z",
#>     "updated_at": "2024-03-07T11:39:47Z",
#>     "closed_at": {},
#>     "author_association": "MEMBER",
#>     "active_lock_reason": {},
#>     "draft": false,
#>     "pull_request": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/pulls/6999",
#>       "html_url": "https://github.com/tidyverse/dplyr/pull/6999",
#>       "diff_url": "https://github.com/tidyverse/dplyr/pull/6999.diff",
#>       "patch_url": "https://github.com/tidyverse/dplyr/pull/6999.patch",
#>       "merged_at": {}
#>     },
#>     "body": {},
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6999/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6999/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6993",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6993/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6993/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6993/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6993",
#>     "id": 2151548779,
#>     "node_id": "I_kwDOAGIUpc6APgdr",
#>     "number": 6993,
#>     "title": "Feature Request: Reduce Boilerplate to Silence Many-to-Many Join Warnings in dplyr",
#>     "user": {
#>       "login": "ryandward",
#>       "id": 6970996,
#>       "node_id": "MDQ6VXNlcjY5NzA5OTY=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/6970996?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/ryandward",
#>       "html_url": "https://github.com/ryandward",
#>       "followers_url": "https://api.github.com/users/ryandward/followers",
#>       "following_url": "https://api.github.com/users/ryandward/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/ryandward/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/ryandward/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/ryandward/subscriptions",
#>       "organizations_url": "https://api.github.com/users/ryandward/orgs",
#>       "repos_url": "https://api.github.com/users/ryandward/repos",
#>       "events_url": "https://api.github.com/users/ryandward/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/ryandward/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 2,
#>     "created_at": "2024-02-23T17:55:53Z",
#>     "updated_at": "2024-03-21T12:31:12Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "**Brief description of the problem:**\r\n\r\nConducting exploratory (_i.e._ not production-environment) data analysis often requires multiple many-to-many joins.  `dplyr`'s current behavior emits warnings for each join when not explicitly specifying `relationship = \"many-to-many\"` and significantly clutter the console output. \r\n\r\nThis behavior introduces verbosity into the exploratory analysis process, where \"many-to-many\" relationships are expected, anticipated, and managed. The repeated need to specify the relationship parameter for each join operation to avoid these warnings is cumbersome and detracts from the efficiency to use `dplyr` as an exploration tool. \r\n\r\nAn option to globally silence these warnings would streamline exploratory data analyses, allowing for a focus on substantive inquiry and result interpretation.\r\n\r\n**Desired output:**\r\n\r\nA global option in `dplyr` to silence warnings for many-to-many joins, enhancing experience by reducing repetitive boilerplate and focusing on relevant outputs.\r\n\r\n**Reprex:**\r\n\r\n```r\r\nlibrary(dplyr)\r\n \r\n    # Example datasets demonstrating the necessity of chained inner_joins\r\n    df1 <- data.frame(key = c(1, 2, 2, 3), value = c(\"A\", \"B\", \"C\", \"D\"))\r\n    df2 <- data.frame(key = c(2, 2, 3, 3, 4), value2 = c(\"W\", \"X\", \"Y\", \"Z\", \"P\"))\r\n    df3 <- data.frame(key = c(2, 3, 3, 4, 5), value3 = c(\"K\", \"L\", \"M\", \"N\", \"O\"))\r\n \r\n    # Chained inner_join operations common in exploratory analysis\r\n    df1 %>%\r\n      inner_join(df2, by = \"key\") %>%\r\n      inner_join(df3, by = \"key\")\r\n\r\n  key value value2 value3\r\n1   2     B      W      K\r\n2   2     B      X      K\r\n3   2     C      W      K\r\n4   2     C      X      K\r\n5   3     D      Y      L\r\n6   3     D      Y      M\r\n7   3     D      Z      L\r\n8   3     D      Z      M\r\nWarning messages:\r\n1: In inner_join(., df2, by = \"key\") :\r\n  Detected an unexpected many-to-many relationship between `x` and `y`.\r\nℹ Row 2 of `x` matches multiple rows in `y`.\r\nℹ Row 1 of `y` matches multiple rows in `x`.\r\nℹ If a many-to-many relationship is expected, set `relationship = \"many-to-many\"` to silence this warning.\r\n2: In inner_join(., df3, by = \"key\") :\r\n  Detected an unexpected many-to-many relationship between `x` and `y`.\r\nℹ Row 5 of `x` matches multiple rows in `y`.\r\nℹ Row 1 of `y` matches multiple rows in `x`.\r\nℹ If a many-to-many relationship is expected, set `relationship = \"many-to-many\"` to silence this warning.\r\n```\r\n\r\nIn the above reprex, joining the objects have duplicate keys results in a many-to-many join, triggering a warning, which is sometimes longer than the output. The proposed feature would allow for operations without the need to explicitly suppress warnings for each operation, assuming a global setting had been enabled.\r\n\r\n## Hypothetical implementation 1\r\n\r\nIntroduce a much faster to type alias, i.e. \"rel\" for \"relationship\" and \"mm\" for \"many-to-many\",  with other options for other relationships.\r\n\r\n```r\r\n    df1 %>%\r\n    inner_join(df2, by = \"key\", rel = 'mm') %>%\r\n    inner_join(df3, by = \"key\", rel = 'mm') \r\n```\r\n\r\n## Hypothetical implementation 2\r\n\r\nIntroduce an option to silence these warnings for a session\r\n\r\n```r\r\noptions(dplyr.silence_many_to_many_warnings = TRUE)\r\n    df1 %>%\r\n    inner_join(df2, by = \"key\") %>%\r\n    inner_join(df3, by = \"key\") \r\n\r\n```\r\n",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6993/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6993/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6992",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6992/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6992/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6992/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6992",
#>     "id": 2146085344,
#>     "node_id": "I_kwDOAGIUpc5_6qng",
#>     "number": 6992,
#>     "title": "Request non-equal join: closest() supports dual-sided inequality <>",
#>     "user": {
#>       "login": "zhjx19",
#>       "id": 21698296,
#>       "node_id": "MDQ6VXNlcjIxNjk4Mjk2",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/21698296?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/zhjx19",
#>       "html_url": "https://github.com/zhjx19",
#>       "followers_url": "https://api.github.com/users/zhjx19/followers",
#>       "following_url": "https://api.github.com/users/zhjx19/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/zhjx19/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/zhjx19/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/zhjx19/subscriptions",
#>       "organizations_url": "https://api.github.com/users/zhjx19/orgs",
#>       "repos_url": "https://api.github.com/users/zhjx19/repos",
#>       "events_url": "https://api.github.com/users/zhjx19/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/zhjx19/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 0,
#>     "created_at": "2024-02-21T08:15:44Z",
#>     "updated_at": "2024-02-21T08:15:44Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "For example, I now have the following Table 1 and Table 2. I want to find a `value2` from both sides that is closest to the `value` based on matching the IDs. However, closest() only supports an inequality involving one of: >, >=, <, or <=.\r\n\r\n```r\r\nlibrary(purrr)\r\nlibrary(dplyr)\r\n#> \r\n#> Attaching package: 'dplyr'\r\n#> The following objects are masked from 'package:stats':\r\n#> \r\n#>     filter, lag\r\n#> The following objects are masked from 'package:base':\r\n#> \r\n#>     intersect, setdiff, setequal, union\r\ndf1 = tibble(\r\n  ID = c(\"NO1\", \"NO1\", \"NO2\", \"NO3\", \"NO3\", \"NO3\", \"NO4\", \"NO5\", \r\n         \"NO5\", \"NO5\", \"NO5\", \"NO6\", \"NO7\", \"NO7\", \"NO7\", \"NO7\", \r\n         \"NO7\", \"NO8\", \"NO9\", \"NO9\"), \r\n  value = c(11, 25, 22, 24, 29, 1.75, 26, 27, 55, 44, 2.1, 31, \r\n         35, 33, 410, 21, 1.44, 80, 75, 52))\r\ndf1\r\n#> # A tibble: 20 × 2\r\n#>    ID    value2\r\n#>    <chr>  <dbl>\r\n#>  1 NO1    11   \r\n#>  2 NO1    25   \r\n#>  3 NO2    22   \r\n#>  4 NO3    24   \r\n#>  5 NO3    29   \r\n#>  6 NO3     1.75\r\n#>  7 NO4    26   \r\n#>  8 NO5    27   \r\n#>  9 NO5    55   \r\n#> 10 NO5    44   \r\n#> 11 NO5     2.1 \r\n#> 12 NO6    31   \r\n#> 13 NO7    35   \r\n#> 14 NO7    33   \r\n#> 15 NO7   410   \r\n#> 16 NO7    21   \r\n#> 17 NO7     1.44\r\n#> 18 NO8    80   \r\n#> 19 NO9    75   \r\n#> 20 NO9    52\r\ndf2 = tibble(\r\n  编号 = c(\"NO1\", \"NO1\", \"NO2\", \"NO3\", \"NO3\", \"NO4\", \"NO5\", \"NO5\", \r\n         \"NO5\", \"NO5\", \"NO6\", \"NO7\", \"NO7\", \"NO7\", \"NO8\", \"NO9\", \"NO9\"), \r\n  数值2 = c(11.2, 24.6, 21.6, 22, 29.5, 26.1, 26.9, 26.4, 54.3,\r\n            42.1, 30.2, 34.7, 31.2, 20.59, 79.8, 74.2, 50.9))\r\ndf2\r\n#> # A tibble: 17 × 2\r\n#>    编号  数值2\r\n#>    <chr> <dbl>\r\n#>  1 NO1    11.2\r\n#>  2 NO1    24.6\r\n#>  3 NO2    21.6\r\n#>  4 NO3    22  \r\n#>  5 NO3    29.5\r\n#>  6 NO4    26.1\r\n#>  7 NO5    26.9\r\n#>  8 NO5    26.4\r\n#>  9 NO5    54.3\r\n#> 10 NO5    42.1\r\n#> 11 NO6    30.2\r\n#> 12 NO7    34.7\r\n#> 13 NO7    31.2\r\n#> 14 NO7    20.6\r\n#> 15 NO8    79.8\r\n#> 16 NO9    74.2\r\n#> 17 NO9    50.9\r\n```\r\n\r\nThe manual method I can think of right now is:\r\n\r\n```r\r\ndf1 %>%\r\n  left_join(df2, join_by(编号), relationship = \"many-to-many\") %>%\r\n  group_nest(编号, 数值) %>%\r\n  mutate(数值2 = map2_dbl(数值, data, \\(x, y) y$数值2[which.min(abs(y$数值2 - x))]),\r\n         误差 = abs(数值 - 数值2)) %>%\r\n  select(-data)\r\n#> # A tibble: 20 × 4\r\n#>    编号    数值 数值2    误差\r\n#>    <chr>  <dbl> <dbl>   <dbl>\r\n#>  1 NO1    11     11.2   0.200\r\n#>  2 NO1    25     24.6   0.400\r\n#>  3 NO2    22     21.6   0.400\r\n#>  4 NO3     1.75  22    20.2  \r\n#>  5 NO3    24     22     2    \r\n#>  6 NO3    29     29.5   0.5  \r\n#>  7 NO4    26     26.1   0.100\r\n#>  8 NO5     2.1   26.4  24.3  \r\n#>  9 NO5    27     26.9   0.100\r\n#> 10 NO5    44     42.1   1.90 \r\n#> 11 NO5    55     54.3   0.700\r\n#> 12 NO6    31     30.2   0.800\r\n#> 13 NO7     1.44  20.6  19.2  \r\n#> 14 NO7    21     20.6   0.41 \r\n#> 15 NO7    33     34.7   1.70 \r\n#> 16 NO7    35     34.7   0.300\r\n#> 17 NO7   410     34.7 375.   \r\n#> 18 NO8    80     79.8   0.200\r\n#> 19 NO9    52     50.9   1.10 \r\n#> 20 NO9    75     74.2   0.800\r\n```",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6992/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6992/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6991",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6991/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6991/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6991/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6991",
#>     "id": 2133878016,
#>     "node_id": "I_kwDOAGIUpc5_MGUA",
#>     "number": 6991,
#>     "title": "Add `tidypolars` to the list of backends?",
#>     "user": {
#>       "login": "etiennebacher",
#>       "id": 52219252,
#>       "node_id": "MDQ6VXNlcjUyMjE5MjUy",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/52219252?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/etiennebacher",
#>       "html_url": "https://github.com/etiennebacher",
#>       "followers_url": "https://api.github.com/users/etiennebacher/followers",
#>       "following_url": "https://api.github.com/users/etiennebacher/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/etiennebacher/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/etiennebacher/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/etiennebacher/subscriptions",
#>       "organizations_url": "https://api.github.com/users/etiennebacher/orgs",
#>       "repos_url": "https://api.github.com/users/etiennebacher/repos",
#>       "events_url": "https://api.github.com/users/etiennebacher/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/etiennebacher/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 0,
#>     "created_at": "2024-02-14T09:14:01Z",
#>     "updated_at": "2024-02-14T09:14:44Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "Hello, I've been working on [`tidypolars`](https://tidypolars.etiennebacher.com/) for a few months. It provides the `tidyverse` syntax while using [`polars`](https://rpolars.github.io/) as backend. `polars` provides functions to manipulate dataframes, but also strings, dates, and many more things. Although `tidypolars` doesn't support all functions from the `tidyverse` for now (`lubridate` support in particular is lagging behind), most of `dplyr`, `tidyr`, and `stringr` functions are covered (some arguments might not be supported yet).\r\n\r\nWould you accept adding `tidypolars` to the [list of backends](https://github.com/tidyverse/dplyr?tab=readme-ov-file#backends) in the README? That would give more visibility to `tidypolars` and would hopefully encourage people to contribute, which would be greatly appreciated given the important number of R / `tidyverse` functions to translate to `polars` syntax.\r\n\r\nHappy to make a PR if so.",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6991/reactions",
#>       "total_count": 2,
#>       "+1": 1,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 1
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6991/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6990",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6990/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6990/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6990/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6990",
#>     "id": 2133291522,
#>     "node_id": "I_kwDOAGIUpc5_J3IC",
#>     "number": 6990,
#>     "title": "Request: Add native pipeline/verb logging option similar to `tidylog` package. ",
#>     "user": {
#>       "login": "orgadish",
#>       "id": 48453207,
#>       "node_id": "MDQ6VXNlcjQ4NDUzMjA3",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/48453207?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/orgadish",
#>       "html_url": "https://github.com/orgadish",
#>       "followers_url": "https://api.github.com/users/orgadish/followers",
#>       "following_url": "https://api.github.com/users/orgadish/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/orgadish/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/orgadish/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/orgadish/subscriptions",
#>       "organizations_url": "https://api.github.com/users/orgadish/orgs",
#>       "repos_url": "https://api.github.com/users/orgadish/repos",
#>       "events_url": "https://api.github.com/users/orgadish/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/orgadish/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 0,
#>     "created_at": "2024-02-13T23:20:35Z",
#>     "updated_at": "2024-02-13T23:20:42Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "The `tidylog` package is an amazing supplement to the `dplyr` and `tidyr` packages. It allows immediate tracking/debugging of a pipeline by giving high-level information on the results of each step in the pipeline (see below). It's _especially_ useful in tracking joins, which I know was an important part of the error and warning handling made to the join functions in dplyr 1.1.0+.\r\n\r\nThe silly example below shows what messages `tidylog` provides about the process. \r\n\r\nI **_always_** use `tidylog` by default and I would love to also teach it to my students. But I don't because it works by masking regular tidyverse verbs with a logging version, which eliminates use of auto-complete. In order to implement auto-complete, the maintainer of the tidylog would have to constantly keep up with tidyverse updates even though they are completely separate (elbersb/tidylog#56)\r\n\r\nIt would be great if this kind of functionality were implemented **natively** and maintained by the relevant teams so that updates to APIs (e.g. new arguments) would also involve updating the log structure.\r\n\r\n``` r\r\nsuppressMessages({\r\n  library(tidyverse)\r\n  library(tidylog)\r\n})\r\n\r\ntbl1 <- dplyr::starwars |> \r\n  filter(height > 90) |> \r\n  select(name, height, mass, hair_color) |> \r\n  summarize(\r\n    across(c(height, mass), mean),\r\n    name_list = list(name),\r\n    .by = hair_color\r\n  )\r\n#> filter: removed 9 rows (10%), 78 rows remaining\r\n#> select: dropped 10 variables (skin_color, eye_color, birth_year, sex, gender, …)\r\n#> summarize: now 12 rows and 4 columns, ungrouped\r\n  \r\ntbl2 <- dplyr::starwars |>\r\n  select(hair_color, films) |> \r\n  unnest_longer(films) |> \r\n  summarize(\r\n    films_list = list(films),\r\n    .by = hair_color\r\n  )\r\n#> select: dropped 12 variables (name, height, mass, skin_color, eye_color, …)\r\n#> summarize: now 12 rows and 2 columns, ungrouped\r\n\r\njoined <- tbl1 |> \r\n  full_join(\r\n    tbl2,\r\n    by = join_by(hair_color)\r\n  )\r\n#> full_join: added one column (films_list)\r\n#>            > rows only in tbl1   0\r\n#>            > rows only in tbl2   0\r\n#>            > matched rows       12\r\n#>            >                   ====\r\n#>            > rows total         12\r\n```\r\n\r\n<sup>Created on 2024-02-13 with [reprex v2.0.2](https://reprex.tidyverse.org)<\/sup>\r\n",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6990/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6990/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6986",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6986/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6986/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6986/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6986",
#>     "id": 2106203600,
#>     "node_id": "I_kwDOAGIUpc59ih3Q",
#>     "number": 6986,
#>     "title": "Update `.groups` message after `group_by() |> summarize()`",
#>     "user": {
#>       "login": "mine-cetinkaya-rundel",
#>       "id": 5965649,
#>       "node_id": "MDQ6VXNlcjU5NjU2NDk=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/5965649?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/mine-cetinkaya-rundel",
#>       "html_url": "https://github.com/mine-cetinkaya-rundel",
#>       "followers_url": "https://api.github.com/users/mine-cetinkaya-rundel/followers",
#>       "following_url": "https://api.github.com/users/mine-cetinkaya-rundel/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/mine-cetinkaya-rundel/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/mine-cetinkaya-rundel/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/mine-cetinkaya-rundel/subscriptions",
#>       "organizations_url": "https://api.github.com/users/mine-cetinkaya-rundel/orgs",
#>       "repos_url": "https://api.github.com/users/mine-cetinkaya-rundel/repos",
#>       "events_url": "https://api.github.com/users/mine-cetinkaya-rundel/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/mine-cetinkaya-rundel/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 0,
#>     "created_at": "2024-01-29T18:52:31Z",
#>     "updated_at": "2024-01-29T18:52:31Z",
#>     "closed_at": {},
#>     "author_association": "MEMBER",
#>     "active_lock_reason": {},
#>     "body": "Currently this is the message dplyr emits for `summarize()` after `group_by()` with multiple variables.\r\n\r\n``` r\r\nlibrary(dplyr)\r\n\r\nmtcars |>\r\n  group_by(vs, am) |>\r\n  summarize(mean_mpg = mean(mpg))\r\n#> `summarise()` has grouped output by 'vs'. You can override using the `.groups`\r\n#> argument.\r\n#> # A tibble: 4 × 3\r\n#> # Groups:   vs [2]\r\n#>      vs    am mean_mpg\r\n#>   <dbl> <dbl>    <dbl>\r\n#> 1     0     0     15.0\r\n#> 2     0     1     19.8\r\n#> 3     1     0     20.7\r\n#> 4     1     1     28.4\r\n```\r\n\r\n<sup>Created on 2024-01-29 with [reprex v2.0.2](https://reprex.tidyverse.org)<\/sup>\r\n\r\nI think this message is still confusing and would be more clear if the grouping message was about the output and it explicitly stated `.groups` is an argument in `summarize()`, e.g.,\r\n\r\n```\r\nThe output is grouped by `vs`. You can specify grouping structure of the output using the `.groups` argument in `summarize()`.\r\n```\r\n\r\nIf going this route some things to keep in mind:\r\n\r\n- Maybe \"result\" instead of \"output\" in two places in the message, or change the description of the `.groups` argument to say \"Grouping structure of the output.\" Basically, we should match what we're calling the \"thing\" that the function spits out.\r\n- It would be a nice-to-have if US/UK spelling of the function in the message matched what the spelling in the code that generates the message.\r\n\r\nAn alternative suggestion by @DavisVaughan was\r\n\r\n```\r\nsummarize() has computed your expressions grouped by (foo, bar), and has regrouped the output by (foo).\r\n```\r\n\r\nI think this is an improvement over the current message too, but I'd suggest going with something simpler like the one above.\r\n",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6986/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6986/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6985",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6985/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6985/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6985/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6985",
#>     "id": 2088207009,
#>     "node_id": "I_kwDOAGIUpc58d4Kh",
#>     "number": 6985,
#>     "title": "perfromance slowdown using across within mutate",
#>     "user": {
#>       "login": "nirguk",
#>       "id": 37558320,
#>       "node_id": "MDQ6VXNlcjM3NTU4MzIw",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/37558320?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/nirguk",
#>       "html_url": "https://github.com/nirguk",
#>       "followers_url": "https://api.github.com/users/nirguk/followers",
#>       "following_url": "https://api.github.com/users/nirguk/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/nirguk/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/nirguk/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/nirguk/subscriptions",
#>       "organizations_url": "https://api.github.com/users/nirguk/orgs",
#>       "repos_url": "https://api.github.com/users/nirguk/repos",
#>       "events_url": "https://api.github.com/users/nirguk/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/nirguk/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 1,
#>     "created_at": "2024-01-18T12:40:19Z",
#>     "updated_at": "2024-01-18T16:40:44Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "I believe this is an unexplored performance issue, seemingly relating to dplyr::expand_across\r\n\r\nBenchmarked over a 1000 repetitions of processing ames data; There is a marked difference between direct mutation, and indirect mutation faciliated by across , seemingly both when using `where()` selection, and explicit all_of(c(..)) style selection. The latter speed degredation (of direct listing through all_of(c(...)) I think shows that the issue wont be related to checking properties a la the where() instant. \r\n\r\nI think the performance issue is significant, with direct mutation approx 3x faster than that mediated by across\r\n```\r\n# A tibble: 4 × 9\r\n  expression                                             min   median *`itr/sec`* mem_alloc `gc/sec` n_itr  n_gc total_time\r\n  <bch:expr>                                        <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl> <int> <dbl>   <bch:tm>\r\n1 acrosswhere_func(ames_narrow)                       3.69ms   4.26ms      *219.*    1.75MB     7.70   966    34      4.42s\r\n2 across_all_of_func(ames_narrow)                      3.3ms   3.83ms      *256.*   64.73KB     8.20   969    31      3.78s\r\n3 direct_mutate_func(ames_narrow)                      1.1ms   1.26ms      *766.*   48.59KB     8.52   989    11      1.29s\r\n4 direct_mutate_with_class_detect_func(ames_narrow)   1.22ms   1.36ms      *722.*   71.12KB     8.77   988    12      1.37s\r\n```\r\nI came across and considered whether this was related to #6897; however I believe it is something else.\r\nHere when using across I use the anonymous function syntax as advised.\r\n\r\nfirst a reprex and then my session info...\r\n\r\n```r\r\nlibrary(bench)\r\nlibrary(tidyverse)\r\nlibrary(modeldata)\r\noptions(\"lifecycle_verbosity\"=\"error\")\r\n\r\n\r\n(ames_narrow <- ames |> select(1:5))\r\n\r\nnum_op <- mean\r\nchar_op <- identity\r\n\r\nacrosswhere_func <- function(a){\r\n  mutate(a,\r\n         across(where(is.numeric),\\(x){num_op(x)}),\r\n         across(where(is.character)|where(is.factor),\\(x){char_op(x)}))\r\n}\r\n\r\nacross_all_of_func <- function(a){\r\n  mutate(a,\r\n         across(all_of(c(\"Lot_Frontage\",\"Lot_Area\")),\\(x){num_op(x)}),\r\n         across(all_of(c(\"MS_SubClass\",\"MS_Zoning\",\"Street\")),\\(x){char_op(x)}))\r\n}\r\n\r\n\r\ndirect_mutate_func <- function(a){\r\n  mutate(a,\r\n         Lot_Frontage = num_op(Lot_Frontage),\r\n         Lot_Area = num_op(Lot_Area),\r\n         MS_SubClass =  char_op(MS_SubClass),\r\n         MS_Zoning =  char_op(MS_Zoning),\r\n         Street = char_op(Street))\r\n}\r\n\r\ndirect_mutate_with_class_detect_func <- function(a){\r\n  \r\n  l <- map_lgl(a,\\(x)is.numeric(x))\r\n  numnames <- names(l[l])\r\n  l <- map_lgl(a,\\(x){is.character(x)|is.factor(x)})\r\n  catnames <- names(l[l])\r\n  \r\n  mutate(a,\r\n         Lot_Frontage = num_op(Lot_Frontage),\r\n         Lot_Area = num_op(Lot_Area),\r\n         MS_SubClass =  char_op(MS_SubClass),\r\n         MS_Zoning =  char_op(MS_Zoning),\r\n         Street = char_op(Street))\r\n}\r\n\r\nb1 <- mark(acrosswhere_func(ames_narrow),\r\n           across_all_of_func(ames_narrow),\r\n           direct_mutate_func(ames_narrow),\r\n           direct_mutate_with_class_detect_func(ames_narrow),iterations = 1000L)\r\n\r\nselect(b1,1:9)\r\n\r\n```\r\nsession info \r\n```\r\nR version 4.2.2 (2022-10-31 ucrt)\r\nPlatform: x86_64-w64-mingw32/x64 (64-bit)\r\nRunning under: Windows 10 x64 (build 19045)\r\n\r\nMatrix products: default\r\n\r\nlocale:\r\n[1] LC_COLLATE=English_United Kingdom.utf8  LC_CTYPE=English_United Kingdom.utf8   \r\n[3] LC_MONETARY=English_United Kingdom.utf8 LC_NUMERIC=C                           \r\n[5] LC_TIME=English_United Kingdom.utf8    \r\n\r\nattached base packages:\r\n[1] stats     graphics  grDevices utils     datasets  methods   base     \r\n\r\nother attached packages:\r\n [1] modeldata_1.2.0 lubridate_1.9.3 forcats_1.0.0   stringr_1.5.1   dplyr_1.1.4     purrr_1.0.2     readr_2.1.5    \r\n [8] tidyr_1.3.0     tibble_3.2.1    ggplot2_3.4.4   tidyverse_2.0.0 bench_1.1.3    \r\n\r\nloaded via a namespace (and not attached):\r\n [1] rstudioapi_0.15.0 magrittr_2.0.3    hms_1.1.3         tidyselect_1.2.0  munsell_0.5.0     timechange_0.2.0 \r\n [7] colorspace_2.1-0  R6_2.5.1          rlang_1.1.3       fansi_1.0.4       tools_4.2.2       grid_4.2.2       \r\n[13] gtable_0.3.4      utf8_1.2.3        cli_3.6.2         withr_2.5.0       lifecycle_1.0.3   tzdb_0.4.0       \r\n[19] vctrs_0.6.5       glue_1.6.2        stringi_1.7.8     compiler_4.2.2    pillar_1.9.0      generics_0.1.3   \r\n[25] scales_1.2.1      profmem_0.6.0     pkgconfig_2.0.3 \r\n```",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6985/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6985/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6984",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6984/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6984/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6984/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6984",
#>     "id": 2081058363,
#>     "node_id": "I_kwDOAGIUpc58Cm47",
#>     "number": 6984,
#>     "title": "`cur_column()` not working in `case_when()` LHS",
#>     "user": {
#>       "login": "shirdekel",
#>       "id": 49865192,
#>       "node_id": "MDQ6VXNlcjQ5ODY1MTky",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/49865192?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/shirdekel",
#>       "html_url": "https://github.com/shirdekel",
#>       "followers_url": "https://api.github.com/users/shirdekel/followers",
#>       "following_url": "https://api.github.com/users/shirdekel/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/shirdekel/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/shirdekel/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/shirdekel/subscriptions",
#>       "organizations_url": "https://api.github.com/users/shirdekel/orgs",
#>       "repos_url": "https://api.github.com/users/shirdekel/repos",
#>       "events_url": "https://api.github.com/users/shirdekel/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/shirdekel/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 1,
#>     "created_at": "2024-01-15T00:53:29Z",
#>     "updated_at": "2024-01-19T10:01:29Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "I want to recode certain columns based on values of columns that have a similar naming. I'm using 1. `case_when()` to recode, 2. `cur_column()` to programmatically select the \"related\" columns, and 3. `across()` to automatically do this across the relevant columns.\r\n\r\nAs shown below, I can do this when specifying one column, but not with `cur_column()`. It complains that it must be used within `across()`, even though it is being used within `across()`\r\n\r\n``` r\r\nlibrary(dplyr)\r\n#> \r\n#> Attaching package: 'dplyr'\r\n#> The following objects are masked from 'package:stats':\r\n#> \r\n#>     filter, lag\r\n#> The following objects are masked from 'package:base':\r\n#> \r\n#>     intersect, setdiff, setequal, union\r\nlibrary(stringr)\r\n\r\nnames_list <-\r\n  c(\"x\", \"y\", \"color\")\r\n\r\n## works\r\n\r\nstarwars |>\r\n  rename(color = hair_color) |>\r\n  mutate(across(\r\n    skin_color,\r\n    \\(x)\r\n    case_when(\r\n      x == \"fair\" ~ x,\r\n      is.na(!!sym(na.omit(str_extract(\"skin_color\", names_list)))) ~ NA,\r\n      .default = \"other\"\r\n    )\r\n  )) |>\r\n  select(color, skin_color)\r\n#> # A tibble: 87 × 2\r\n#>    color         skin_color\r\n#>    <chr>         <chr>     \r\n#>  1 blond         fair      \r\n#>  2 <NA>          <NA>      \r\n#>  3 <NA>          <NA>      \r\n#>  4 none          other     \r\n#>  5 brown         other     \r\n#>  6 brown, grey   other     \r\n#>  7 brown         other     \r\n#>  8 <NA>          <NA>      \r\n#>  9 black         other     \r\n#> 10 auburn, white fair      \r\n#> # ℹ 77 more rows\r\n\r\n## doesn't work\r\n\r\nstarwars |>\r\n  rename(color = hair_color) |>\r\n  mutate(across(\r\n    skin_color,\r\n    \\(x)\r\n    case_when(\r\n      x == \"fair\" ~ x,\r\n      is.na(!!sym(na.omit(str_extract(cur_column(), names_list)))) ~ NA,\r\n      .default = \"other\"\r\n    )\r\n  )) |>\r\n  select(color, skin_color)\r\n#> Error in `cur_column()`:\r\n#> ! Must only be used inside `across()`.\r\n```\r\n\r\n<sup>Created on 2024-01-15 with [reprex v2.1.0](https://reprex.tidyverse.org)<\/sup>\r\n\r\n<details style=\"margin-bottom:10px;\">\r\n<summary>\r\nSession info\r\n<\/summary>\r\n\r\n``` r\r\nsessioninfo::session_info()\r\n#> ─ Session info ───────────────────────────────────────────────────────────────\r\n#>  setting  value\r\n#>  version  R version 4.3.2 (2023-10-31)\r\n#>  os       macOS Sonoma 14.2.1\r\n#>  system   aarch64, darwin23.0.0\r\n#>  ui       unknown\r\n#>  language (EN)\r\n#>  collate  en_AU.UTF-8\r\n#>  ctype    en_AU.UTF-8\r\n#>  tz       Australia/Sydney\r\n#>  date     2024-01-15\r\n#>  pandoc   2.19.2 @ /opt/homebrew/bin/ (via rmarkdown)\r\n#> \r\n#> ─ Packages ───────────────────────────────────────────────────────────────────\r\n#>  package     * version date (UTC) lib source\r\n#>  cli           3.6.2   2023-12-11 [1] CRAN (R 4.3.2)\r\n#>  digest        0.6.33  2023-07-07 [1] CRAN (R 4.3.2)\r\n#>  dplyr       * 1.1.4   2023-11-17 [1] CRAN (R 4.3.2)\r\n#>  evaluate      0.23    2023-11-01 [1] CRAN (R 4.3.2)\r\n#>  fansi         1.0.6   2023-12-08 [1] CRAN (R 4.3.2)\r\n#>  fastmap       1.1.1   2023-02-24 [1] CRAN (R 4.3.2)\r\n#>  fs            1.6.3   2023-07-20 [1] CRAN (R 4.3.2)\r\n#>  generics      0.1.3   2022-07-05 [1] CRAN (R 4.3.2)\r\n#>  glue          1.7.0   2024-01-09 [1] CRAN (R 4.3.2)\r\n#>  htmltools     0.5.7   2023-11-03 [1] CRAN (R 4.3.2)\r\n#>  knitr         1.45    2023-10-30 [1] CRAN (R 4.3.2)\r\n#>  lifecycle     1.0.4   2023-11-07 [1] CRAN (R 4.3.2)\r\n#>  magrittr      2.0.3   2022-03-30 [1] CRAN (R 4.3.2)\r\n#>  pillar        1.9.0   2023-03-22 [1] CRAN (R 4.3.2)\r\n#>  pkgconfig     2.0.3   2019-09-22 [1] CRAN (R 4.3.2)\r\n#>  purrr         1.0.2   2023-08-10 [1] CRAN (R 4.3.2)\r\n#>  R.cache       0.16.0  2022-07-21 [1] CRAN (R 4.3.2)\r\n#>  R.methodsS3   1.8.2   2022-06-13 [1] CRAN (R 4.3.2)\r\n#>  R.oo          1.25.0  2022-06-12 [1] CRAN (R 4.3.2)\r\n#>  R.utils       2.12.3  2023-11-18 [1] CRAN (R 4.3.2)\r\n#>  R6            2.5.1   2021-08-19 [1] CRAN (R 4.3.2)\r\n#>  reprex        2.1.0   2024-01-11 [1] CRAN (R 4.3.2)\r\n#>  rlang         1.1.2   2023-11-04 [1] CRAN (R 4.3.2)\r\n#>  rmarkdown     2.25    2023-09-18 [1] CRAN (R 4.3.2)\r\n#>  sessioninfo   1.2.2   2021-12-06 [1] CRAN (R 4.3.2)\r\n#>  stringi       1.8.3   2023-12-11 [1] CRAN (R 4.3.2)\r\n#>  stringr     * 1.5.1   2023-11-14 [1] CRAN (R 4.3.2)\r\n#>  styler        1.10.2  2023-08-29 [1] CRAN (R 4.3.2)\r\n#>  tibble        3.2.1   2023-03-20 [1] CRAN (R 4.3.2)\r\n#>  tidyselect    1.2.0   2022-10-10 [1] CRAN (R 4.3.2)\r\n#>  utf8          1.2.4   2023-10-22 [1] CRAN (R 4.3.2)\r\n#>  vctrs         0.6.5   2023-12-01 [1] CRAN (R 4.3.2)\r\n#>  withr         2.5.2   2023-10-30 [1] CRAN (R 4.3.2)\r\n#>  xfun          0.41    2023-11-01 [1] CRAN (R 4.3.2)\r\n#>  yaml          2.3.8   2023-12-11 [1] CRAN (R 4.3.2)\r\n#> \r\n#>  [1] /opt/homebrew/Cellar/r/4.3.2/lib/R/library\r\n#> \r\n#> ──────────────────────────────────────────────────────────────────────────────\r\n```\r\n\r\n<\/details>",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6984/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6984/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6980",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6980/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6980/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6980/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6980",
#>     "id": 2070183339,
#>     "node_id": "I_kwDOAGIUpc57ZH2r",
#>     "number": 6980,
#>     "title": "arrange not reporting syntax errors on .by_group",
#>     "user": {
#>       "login": "py9mrg",
#>       "id": 12600721,
#>       "node_id": "MDQ6VXNlcjEyNjAwNzIx",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/12600721?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/py9mrg",
#>       "html_url": "https://github.com/py9mrg",
#>       "followers_url": "https://api.github.com/users/py9mrg/followers",
#>       "following_url": "https://api.github.com/users/py9mrg/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/py9mrg/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/py9mrg/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/py9mrg/subscriptions",
#>       "organizations_url": "https://api.github.com/users/py9mrg/orgs",
#>       "repos_url": "https://api.github.com/users/py9mrg/repos",
#>       "events_url": "https://api.github.com/users/py9mrg/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/py9mrg/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 1,
#>     "created_at": "2024-01-08T10:44:14Z",
#>     "updated_at": "2024-01-08T20:52:14Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "Hello,\r\n\r\nWhen using `arrange` on grouped data (and wanting to respect the grouping), we need to use the `.by_group` argument. However, if you make a syntax error - e.g. `by_group` or `.by_groups` - then the arranging fails to respect the groups silently. This has the potential to lead to serious errors in analysis.\r\n\r\n``` r\r\nlibrary(dplyr)\r\n#> \r\n#> Attaching package: 'dplyr'\r\n#> The following objects are masked from 'package:stats':\r\n#> \r\n#>     filter, lag\r\n#> The following objects are masked from 'package:base':\r\n#> \r\n#>     intersect, setdiff, setequal, union\r\n\r\n# correct behaviour\r\nmtcars |>\r\n  group_by(cyl) |>\r\n  arrange(mpg, .by_group = TRUE)\r\n#> # A tibble: 32 × 11\r\n#> # Groups:   cyl [3]\r\n#>      mpg   cyl  disp    hp  drat    wt  qsec    vs    am  gear  carb\r\n#>    <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>\r\n#>  1  21.4     4 121     109  4.11  2.78  18.6     1     1     4     2\r\n#>  2  21.5     4 120.     97  3.7   2.46  20.0     1     0     3     1\r\n#>  3  22.8     4 108      93  3.85  2.32  18.6     1     1     4     1\r\n#>  4  22.8     4 141.     95  3.92  3.15  22.9     1     0     4     2\r\n#>  5  24.4     4 147.     62  3.69  3.19  20       1     0     4     2\r\n#>  6  26       4 120.     91  4.43  2.14  16.7     0     1     5     2\r\n#>  7  27.3     4  79      66  4.08  1.94  18.9     1     1     4     1\r\n#>  8  30.4     4  75.7    52  4.93  1.62  18.5     1     1     4     2\r\n#>  9  30.4     4  95.1   113  3.77  1.51  16.9     1     1     5     2\r\n#> 10  32.4     4  78.7    66  4.08  2.2   19.5     1     1     4     1\r\n#> # ℹ 22 more rows\r\n\r\n# syntax error leads to no grouping, but happens silently\r\nmtcars |>\r\n  group_by(cyl) |>\r\n  arrange(mpg, .by_groups = TRUE)\r\n#> # A tibble: 32 × 11\r\n#> # Groups:   cyl [3]\r\n#>      mpg   cyl  disp    hp  drat    wt  qsec    vs    am  gear  carb\r\n#>    <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>\r\n#>  1  10.4     8  472    205  2.93  5.25  18.0     0     0     3     4\r\n#>  2  10.4     8  460    215  3     5.42  17.8     0     0     3     4\r\n#>  3  13.3     8  350    245  3.73  3.84  15.4     0     0     3     4\r\n#>  4  14.3     8  360    245  3.21  3.57  15.8     0     0     3     4\r\n#>  5  14.7     8  440    230  3.23  5.34  17.4     0     0     3     4\r\n#>  6  15       8  301    335  3.54  3.57  14.6     0     1     5     8\r\n#>  7  15.2     8  276.   180  3.07  3.78  18       0     0     3     3\r\n#>  8  15.2     8  304    150  3.15  3.44  17.3     0     0     3     2\r\n#>  9  15.5     8  318    150  2.76  3.52  16.9     0     0     3     2\r\n#> 10  15.8     8  351    264  4.22  3.17  14.5     0     1     5     4\r\n#> # ℹ 22 more rows\r\n```\r\n\r\n<sup>Created on 2024-01-08 with [reprex v2.0.2](https://reprex.tidyverse.org)<\/sup>\r\n\r\nI assume this is happening because of the `...` argument combined with passing an object set to `TRUE`. I think there needs to be something here that either checks for arguments similar to `.by_group` but miss-spelt, or some other method to warn / throw an error in such circumstances. Failing to group silently seems a bit dangerous.",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6980/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6980/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6978",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6978/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6978/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6978/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6978",
#>     "id": 2058402035,
#>     "node_id": "I_kwDOAGIUpc56sLjz",
#>     "number": 6978,
#>     "title": "A better data masking indirection example in the `programming.Rmd` vignette: `filter(df, {{ var }})`",
#>     "user": {
#>       "login": "wbzyl",
#>       "id": 8049,
#>       "node_id": "MDQ6VXNlcjgwNDk=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/8049?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/wbzyl",
#>       "html_url": "https://github.com/wbzyl",
#>       "followers_url": "https://api.github.com/users/wbzyl/followers",
#>       "following_url": "https://api.github.com/users/wbzyl/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/wbzyl/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/wbzyl/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/wbzyl/subscriptions",
#>       "organizations_url": "https://api.github.com/users/wbzyl/orgs",
#>       "repos_url": "https://api.github.com/users/wbzyl/repos",
#>       "events_url": "https://api.github.com/users/wbzyl/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/wbzyl/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 0,
#>     "created_at": "2023-12-28T12:51:49Z",
#>     "updated_at": "2023-12-28T12:51:49Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "This code does not work:\r\n```r\r\nf <- function(df, var) filter(df, {{ var }})\r\nf(mtcars, am)\r\n# Error in `filter()`:\r\n# ℹ In argument: `vs`.\r\n# Caused by error:\r\n# ! `..1` must be a logical vector, not a double vector.\r\n```\r\n\r\nThis code works:\r\n```r\r\nf <- function(df, var) filter(df, {{ var }} == 0)\r\nf(mtcars, vs)\r\n```\r\n",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6978/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6978/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6973",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6973/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6973/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6973/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6973",
#>     "id": 2026732139,
#>     "node_id": "I_kwDOAGIUpc54zXpr",
#>     "number": 6973,
#>     "title": "Feature request/Question: do not drop extra classes (and attributes) with functions group_by, summarise and so",
#>     "user": {
#>       "login": "catalamarti",
#>       "id": 18575244,
#>       "node_id": "MDQ6VXNlcjE4NTc1MjQ0",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/18575244?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/catalamarti",
#>       "html_url": "https://github.com/catalamarti",
#>       "followers_url": "https://api.github.com/users/catalamarti/followers",
#>       "following_url": "https://api.github.com/users/catalamarti/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/catalamarti/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/catalamarti/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/catalamarti/subscriptions",
#>       "organizations_url": "https://api.github.com/users/catalamarti/orgs",
#>       "repos_url": "https://api.github.com/users/catalamarti/repos",
#>       "events_url": "https://api.github.com/users/catalamarti/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/catalamarti/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 1,
#>     "created_at": "2023-12-05T17:10:59Z",
#>     "updated_at": "2024-01-16T10:20:59Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "We are building some packages on top of all the dplyr + dbplyr infrastructure (very grateful for that) and we build some classes like 'generated_cohort_set', 'cdm_reference', 'cdm_table', 'codelist' and so.\r\n\r\nOne problem that we are facing is that there are some functions (group_by, summarise, ...) that drop the classes (see reprex). \r\nI guess that this is on purpose, but wondering why and if it is something that could be considered to be implemented in the future?\r\n\r\nhere are the packages if you are curious: https://cran.r-project.org/web/packages/CDMConnector/index.html, https://cran.r-project.org/web/packages/DrugUtilisation/index.html, https://cran.r-project.org/web/packages/PatientProfiles/index.html, https://cran.r-project.org/web/packages/IncidencePrevalence/index.html ...)\r\n\r\n``` r\r\nx <- dplyr::tibble(a = 1)\r\nclass(x) <- c(\"my_class\", class(x))\r\nclass(x)\r\n#> [1] \"my_class\"   \"tbl_df\"     \"tbl\"        \"data.frame\"\r\nx |> dplyr::mutate(b = 1) |> class()\r\n#> [1] \"my_class\"   \"tbl_df\"     \"tbl\"        \"data.frame\"\r\nx |> dplyr::group_by(a) |> class()\r\n#> [1] \"grouped_df\" \"tbl_df\"     \"tbl\"        \"data.frame\"\r\n```\r\n\r\n<sup>Created on 2023-12-05 with [reprex v2.0.2](https://reprex.tidyverse.org)<\/sup>\r\n\r\nFYI @edward-burn @ablack3",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6973/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6973/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6972",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6972/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6972/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6972/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6972",
#>     "id": 2019264412,
#>     "node_id": "I_kwDOAGIUpc54W4ec",
#>     "number": 6972,
#>     "title": "Feature Request: In across, have function for `.names` argument",
#>     "user": {
#>       "login": "kylebutts",
#>       "id": 19961439,
#>       "node_id": "MDQ6VXNlcjE5OTYxNDM5",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/19961439?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/kylebutts",
#>       "html_url": "https://github.com/kylebutts",
#>       "followers_url": "https://api.github.com/users/kylebutts/followers",
#>       "following_url": "https://api.github.com/users/kylebutts/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/kylebutts/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/kylebutts/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/kylebutts/subscriptions",
#>       "organizations_url": "https://api.github.com/users/kylebutts/orgs",
#>       "repos_url": "https://api.github.com/users/kylebutts/repos",
#>       "events_url": "https://api.github.com/users/kylebutts/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/kylebutts/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 2,
#>     "created_at": "2023-11-30T18:23:12Z",
#>     "updated_at": "2023-12-21T10:04:53Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "One common thing that I want to do in the `dplyr` workflow is take a set of variables, apply some function to them, and create a new set of variables. `across` makes this really easy, but it almost always requires me updating the names in a second step with `rename_with`. I'm wondering if a function would be passed to `.names` that accepts the vector of column names and returns the resulting columns names.\r\n\r\nFor example, I would want:\r\n```r\r\ndata |> \r\n  mutate(across(\r\n    matches(\"emp_[0-9]+\"),\r\n    ~ .x / emp_all, \r\n    .names = \"share_{.col}\"\r\n  )) |>\r\n  rename_with(\r\n    \\(str) gsub(\"^share_emp\", \"share_\", str)\r\n  ) \r\n```\r\nto become:\r\n```r\r\ndata |> \r\n  mutate(across(\r\n    matches(\"emp_[0-9]+\"),\r\n    ~ .x / emp_all, \r\n    .names = \\(str) gsub(\"^share_emp\", \"share_\", str)\r\n  ))\r\n```\r\n\r\nAdmittedly, I haven't thought of how that would play with other features of the function (e.g. multiple functions). Thanks for the consideration!",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6972/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6972/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6970",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6970/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6970/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6970/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6970",
#>     "id": 2007287856,
#>     "node_id": "I_kwDOAGIUpc53pMgw",
#>     "number": 6970,
#>     "title": "Feature request: allow additional predicates in join_by",
#>     "user": {
#>       "login": "cboettig",
#>       "id": 222586,
#>       "node_id": "MDQ6VXNlcjIyMjU4Ng==",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/222586?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/cboettig",
#>       "html_url": "https://github.com/cboettig",
#>       "followers_url": "https://api.github.com/users/cboettig/followers",
#>       "following_url": "https://api.github.com/users/cboettig/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/cboettig/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/cboettig/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/cboettig/subscriptions",
#>       "organizations_url": "https://api.github.com/users/cboettig/orgs",
#>       "repos_url": "https://api.github.com/users/cboettig/repos",
#>       "events_url": "https://api.github.com/users/cboettig/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/cboettig/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 2,
#>     "created_at": "2023-11-23T00:19:30Z",
#>     "updated_at": "2024-01-16T21:27:02Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "`join_by` refuses to handle any predicates it doesn't recognize:\r\n\r\n```\r\nExpressions must use one of: `==`, `>=`, `>`, `<=`, `<`, `closest()`, `between()`, `overlaps()`, or\r\n  `within()`.\r\n```  \r\n\r\nThis is understandable in a narrow sense but interferes with the ability of dplyr to work with external databases like duckdb that are far more expressive.  This is also inconsistent with most of the other dplyr functions, that are quite happy passing along such functions.  Consider manipulating the following `lazy_tbl` objects using the explicitly spatial functions that duckdb recognizes:\r\n\r\n\r\n```r\r\nlibrary(dplyr)\r\ndevtools::install_github(\"cboettig/duckdbfs@spatial-read\")\r\nlibrary(duckdbfs)\r\n\r\ncountries <- open_dataset(\"/vsicurl/https://github.com/cboettig/duckdbfs/raw/spatial-read/inst/extdata/world.gpkg\",\r\n                          format = \"sf\", tblname = \"countries\")\r\n\r\ncities <- open_dataset(\"/vsicurl/https://github.com/cboettig/duckdbfs/raw/spatial-read/inst/extdata/metro.fgb\",\r\n                          format = \"sf\", tblname = \"cities\")\r\n\r\nmelbourne <- st_point(c(144.9633, -37.814)) |> st_as_text()\r\n\r\n# most dplyr functions have no difficulty using these arguments\r\n\r\ncountries |> filter(st_contains(geom, ST_GeomFromText({melbourne})))\r\n```\r\n\r\nnote that `dplyr::filter` (and most other such functions) have no problem passing these `st_*` functions on to duckdb, allowing us to do spatial operations.  Now a very natural operation is to do spatial joins, e.g. in SQL / DBI we can do:\r\n\r\n```\r\ncon <- cached_connection() # duckdbfs connection that holds the above tables\r\n\r\nx <- DBI::dbGetQuery(con,\"\r\nSELECT countries.iso_a3, cities.geom, countries.geom AS geometry\r\nFROM countries\r\nLEFT JOIN cities\r\nON st_contains(countries.geom, cities.geom)\r\n\") |> as_tibble()\r\n```\r\n\r\nAll I'd like is for dplyr to construct this syntax with it's usual wonderful magic, e.g. I want to write:\r\n\r\n```r\r\ncountries |> left_join(cities, join_by(st_contains(geom, geom))) \r\n```\r\n \r\nWouldn't that be nice?  I think it could do so if only `join_by()` was not so fastidious in asserting that it doesn't understand anything but a hard-coded set of functions.   Unfortunately this obviously errors with the message:\r\n\r\n```\r\nError in `join_by()`:\r\n! Expressions must use one of: `==`, `>=`, `>`, `<=`, `<`, `closest()`, `between()`, `overlaps()`, or\r\n  `within()`.\r\nℹ Expression 1 is `st_contains(geom, geom)`.\r\n```\r\n\r\nWould it be possible to just relax this assertion, e.g. when the dataset in question is a remote src?\r\n\r\n\r\n\r\n\r\n",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6970/reactions",
#>       "total_count": 1,
#>       "+1": 1,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6970/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6968",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6968/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6968/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6968/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6968",
#>     "id": 2002723133,
#>     "node_id": "I_kwDOAGIUpc53XyE9",
#>     "number": 6968,
#>     "title": "Emphasize that filter(x, A, B) is not strictly the same as filter(filter(x, A), B)",
#>     "user": {
#>       "login": "MichaelChirico",
#>       "id": 7606389,
#>       "node_id": "MDQ6VXNlcjc2MDYzODk=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/7606389?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/MichaelChirico",
#>       "html_url": "https://github.com/MichaelChirico",
#>       "followers_url": "https://api.github.com/users/MichaelChirico/followers",
#>       "following_url": "https://api.github.com/users/MichaelChirico/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/MichaelChirico/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/MichaelChirico/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/MichaelChirico/subscriptions",
#>       "organizations_url": "https://api.github.com/users/MichaelChirico/orgs",
#>       "repos_url": "https://api.github.com/users/MichaelChirico/repos",
#>       "events_url": "https://api.github.com/users/MichaelChirico/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/MichaelChirico/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [
#>       {
#>         "id": 674867158,
#>         "node_id": "MDU6TGFiZWw2NzQ4NjcxNTg=",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/documentation",
#>         "name": "documentation",
#>         "color": "CBBAB8",
#>         "default": true,
#>         "description": ""
#>       }
#>     ],
#>     "state": "open",
#>     "locked": true,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 4,
#>     "created_at": "2023-11-20T17:58:51Z",
#>     "updated_at": "2023-11-22T11:36:09Z",
#>     "closed_at": {},
#>     "author_association": "CONTRIBUTOR",
#>     "active_lock_reason": "too heated",
#>     "body": "Have had to re-confirm this for myself a few times:\r\n\r\n```r\r\nfilter(mtcars, cyl < max(cyl), hp < max(hp)) |> dim()\r\n# [1] 18 11\r\n\r\n# vs\r\nfilter(filter(mtcars, cyl < max(cyl)), hp < max(hp)) |> dim()\r\n# [1] 17 11\r\n```\r\n\r\nThis in `?dplyr` hints at what's going on:\r\n\r\n> If multiple expressions are included, they are combined with the `&` operator.\r\n\r\nBut this behavior is a bit more subtle / worth calling out IMO. This came up again recently here:\r\n\r\nhttps://github.com/r-lib/lintr/pull/2305#discussion_r1398186673\r\n\r\nFWIW it's also really not clear from reading the `filter.data.frame` implementation without being well-versed in {dplyr} internals.",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6968/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6968/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6962",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6962/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6962/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6962/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6962",
#>     "id": 1986012646,
#>     "node_id": "I_kwDOAGIUpc52YCXm",
#>     "number": 6962,
#>     "title": "Feature request: Pipe-supportive pass-through of unrecoded elements using `case_match()`?",
#>     "user": {
#>       "login": "jmobrien",
#>       "id": 7095842,
#>       "node_id": "MDQ6VXNlcjcwOTU4NDI=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/7095842?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/jmobrien",
#>       "html_url": "https://github.com/jmobrien",
#>       "followers_url": "https://api.github.com/users/jmobrien/followers",
#>       "following_url": "https://api.github.com/users/jmobrien/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/jmobrien/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/jmobrien/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/jmobrien/subscriptions",
#>       "organizations_url": "https://api.github.com/users/jmobrien/orgs",
#>       "repos_url": "https://api.github.com/users/jmobrien/repos",
#>       "events_url": "https://api.github.com/users/jmobrien/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/jmobrien/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 0,
#>     "created_at": "2023-11-09T16:39:56Z",
#>     "updated_at": "2023-11-09T16:42:41Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "`case_match()` is great to have as a more pipe-able alternative to `case_when()` following modern tidyverse approaches.  However, it lacks an equivalent capabilities to one nice feature of its predecessor `recode()`: namely, where non-recoded elements could be allowed to pass through into the output.  While there is a workaround for this missing feature provided in the help examples, I'm realizing it may not generalize well across use cases.\r\n\r\nAn example similar to what I encountered:\r\n\r\n``` r\r\n# Some filenames:\r\nfilenames <- \r\n  c(\"juniors_2022_OU.csv\", \"roster_2023_juniors_notre_dame.csv\",  \"2022_SOU_juniors_roster.csv\")\r\n\r\n# Begin building tibble to (eventually) import & organize the content from these files:\r\ntibble::tibble(\r\n\r\n  # Import filenames (in practice, would be a call to list.files() ):\r\n  file_names = filenames,\r\n  \r\n  # Get key info like year and school out of filenames: \r\n  \r\n  # Year is straightforward:\r\n  id_year = file_names |> stringr::str_extract(\"202[23]\"),\r\n  \r\n  #School, however, needs initialisms expanded to minimize ambiguity:\r\n  \r\n  # recode() can do this inside a single set of piped instructions. It\r\n  # fills in the original data when items are not recoded (& same \r\n  # type as recoded output):\r\n\r\n  id_school_recode = \r\n    file_names |> \r\n    # Remove non-school-name content:\r\n      stringr::str_remove(\".csv$\") |> \r\n      stringr::str_remove(\"_?202[23]_?\") |> \r\n      stringr::str_remove(\"_?juniors_?\") |> \r\n      stringr::str_remove(\"_?roster_?\") |>\r\n    # Recode initialisms:\r\n      dplyr::recode(\r\n        \"OU\" = \"oklahoma\",\r\n        \"SOU\" = \"southern_oregon\"\r\n      ),\r\n  \r\n  # Using case_match(), though, non-recoded elements become NA.\r\n  id_school_casematch = \r\n    file_names |> \r\n      stringr::str_remove(\".csv$\") |> \r\n      stringr::str_remove(\"_?202[23]_?\") |> \r\n      stringr::str_remove(\"_?juniors_?\") |> \r\n      stringr::str_remove(\"_?roster_?\") |> \r\n      dplyr::case_match(\r\n        \"OU\" ~ \"oklahoma\",\r\n        \"SOU\" ~ \"southern_oregon\"\r\n      )\r\n)\r\n#> # A tibble: 3 × 4\r\n#>   file_names                        id_year id_school_recode id_school_casematch\r\n#>   <chr>                             <chr>   <chr>            <chr>              \r\n#> 1 juniors_2022_OU.csv               2022    oklahoma         oklahoma           \r\n#> 2 roster_2023_juniors_notre_dame.c… 2023    notre_dame       <NA>               \r\n#> 3 2022_SOU_juniors_roster.csv       2022    southern_oregon  southern_oregon\r\n \r\n```     \r\n\r\nHelp docs for case_match() has an example that uses argument `.default = <<varname>>` (e.g. species) to fill back in original data.  This would work in `mutate()`, but not here in `tibble()` - using the approach requires multiple arguments specifying the same column/variable, which tibble() forbids:\r\n\r\n``` r\r\ntibble::tibble(\r\n\r\n  # Locate and remove non-name content:\r\n  id_school_casematch = \r\n    filenames |> \r\n    stringr::str_remove(\".csv$\") |> \r\n    stringr::str_remove(\"_?202[23]_?\") |> \r\n    stringr::str_remove(\"_?juniors_?\") |> \r\n    stringr::str_remove(\"_?roster_?\"),\r\n\r\n  # Recode names:\r\n  id_school_casematch = \r\n    id_school_casematch |> \r\n    dplyr::case_match(\r\n      \"OU\" ~ \"oklahoma\",\r\n      \"SOU\" ~ \"southern_oregon\",\r\n      .default = id_school_casematch\r\n    )\r\n)\r\n#> Error in `tibble::tibble()`:\r\n#> ! Column name `id_school_casematch` must not be duplicated.\r\n#> Use `.name_repair` to specify repair.\r\n#> Caused by error in `repaired_names()`:\r\n#> ! Names must be unique.\r\n#> ✖ These names are duplicated:\r\n#>   * \"id_school_casematch\" at locations 1 and 2.\r\n```\r\n\r\n(also, even when using mutate or standard variable creation [<-], specifying any *new* column/variable requires 2 separate arguments/calls.  Admittedly my personal opinion, but that does seems less concise/readable to me, and/or not fully capitalizing on the pipe-ability that seems to be `case_match()`'s key offering.)\r\n\r\nCould `case_match()` perhaps have an option/default added, e.g. `case_match(.x, ..., .default = .x)`,  that would mirror `recode()`'s capabilities?  I recognize you'd still need equivalents to `recode()`'s checks ensuring that new & pass-through content have the same type--but wouldn't that be manageable, given  the `vctrs` underpinnings of this function? \r\n",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6962/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6962/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6958",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6958/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6958/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6958/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6958",
#>     "id": 1983450532,
#>     "node_id": "I_kwDOAGIUpc52OQ2k",
#>     "number": 6958,
#>     "title": "Feature Request: Intuitive DataFrame Transposition Functionality in dplyr",
#>     "user": {
#>       "login": "hsalberti",
#>       "id": 76076260,
#>       "node_id": "MDQ6VXNlcjc2MDc2MjYw",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/76076260?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/hsalberti",
#>       "html_url": "https://github.com/hsalberti",
#>       "followers_url": "https://api.github.com/users/hsalberti/followers",
#>       "following_url": "https://api.github.com/users/hsalberti/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/hsalberti/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/hsalberti/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/hsalberti/subscriptions",
#>       "organizations_url": "https://api.github.com/users/hsalberti/orgs",
#>       "repos_url": "https://api.github.com/users/hsalberti/repos",
#>       "events_url": "https://api.github.com/users/hsalberti/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/hsalberti/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 1,
#>     "created_at": "2023-11-08T12:07:38Z",
#>     "updated_at": "2023-11-11T12:21:32Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "Brief description of the problem:\r\n\r\nTransposing a DataFrame in dplyr currently requires a combination of pivot_longer() and pivot_wider() functions. This process is not as straightforward as using the base R t() function and can be confusing for users, especially those new to dplyr or coming from a base R background. An intuitive, one-step transposition function would greatly simplify the data manipulation process in dplyr.\r\n\r\nExpected output:\r\n\r\nA new function, possibly named transpose_df(), that allows users to transpose a DataFrame in a single step, mirroring the simplicity and ease of use of the base R t() function.\r\n\r\n----------------------------------------------------------------------------------------\r\nlibrary(dplyr)\r\nlibrary(tidyr)\r\n\r\n# Sample dataframe\r\ndf <- tibble::tibble(\r\n  x = 1:3,\r\n  y = 4:6,\r\n  z = 7:9\r\n)\r\n\r\n# Current method for transposing in dplyr/tidyr\r\ntransposed_df <- df %>%\r\n  pivot_longer(cols = everything(), names_to = \"variable\", values_to = \"value\") %>%\r\n  pivot_wider(names_from = \"variable\", values_from = \"value\")\r\n\r\n# Print the transposed dataframe\r\nprint(transposed_df)\r\n",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6958/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6958/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6952",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6952/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6952/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6952/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6952",
#>     "id": 1976871896,
#>     "node_id": "I_kwDOAGIUpc511KvY",
#>     "number": 6952,
#>     "title": "`lifecycle::last_lifecycle_warnings()` seems incompatible with dplyr warning handler",
#>     "user": {
#>       "login": "DavisVaughan",
#>       "id": 19150088,
#>       "node_id": "MDQ6VXNlcjE5MTUwMDg4",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/19150088?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/DavisVaughan",
#>       "html_url": "https://github.com/DavisVaughan",
#>       "followers_url": "https://api.github.com/users/DavisVaughan/followers",
#>       "following_url": "https://api.github.com/users/DavisVaughan/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/DavisVaughan/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/DavisVaughan/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/DavisVaughan/subscriptions",
#>       "organizations_url": "https://api.github.com/users/DavisVaughan/orgs",
#>       "repos_url": "https://api.github.com/users/DavisVaughan/repos",
#>       "events_url": "https://api.github.com/users/DavisVaughan/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/DavisVaughan/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [
#>       {
#>         "id": 17708198,
#>         "node_id": "MDU6TGFiZWwxNzcwODE5OA==",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/bug",
#>         "name": "bug",
#>         "color": "E0B3A2",
#>         "default": true,
#>         "description": "an unexpected problem or unintended behavior"
#>       }
#>     ],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 0,
#>     "created_at": "2023-11-03T20:15:05Z",
#>     "updated_at": "2023-11-03T20:15:11Z",
#>     "closed_at": {},
#>     "author_association": "MEMBER",
#>     "active_lock_reason": {},
#>     "body": "i.e. it tells you to run the lifecycle function, but there is no warning there:\r\n\r\n``` r\r\nlibrary(dplyr, warn.conflicts = FALSE)\r\nrlang::local_interactive()\r\n\r\ndf <- tibble(x = 1)\r\n\r\nmutate(df, across(x, mean, na.rm = TRUE))\r\n#> Warning: There was 1 warning in `mutate()`.\r\n#> ℹ In argument: `across(x, mean, na.rm = TRUE)`.\r\n#> Caused by warning:\r\n#> ! The `...` argument of `across()` is deprecated as of dplyr 1.1.0.\r\n#> Supply arguments directly to `.fns` through an anonymous function instead.\r\n#> \r\n#>   # Previously\r\n#>   across(a:b, mean, na.rm = TRUE)\r\n#> \r\n#>   # Now\r\n#>   across(a:b, \\(x) mean(x, na.rm = TRUE))\r\n#> This warning is displayed once every 8 hours.\r\n#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was\r\n#> generated.\r\n#> # A tibble: 1 × 1\r\n#>       x\r\n#>   <dbl>\r\n#> 1     1\r\n\r\nlifecycle::last_lifecycle_warnings()\r\n#> list()\r\n\r\ndplyr::last_dplyr_warnings()\r\n#> [[1]]\r\n#> <warning/rlang_warning>\r\n#> Warning in `mutate()`:\r\n#> ℹ In argument: `across(x, mean, na.rm = TRUE)`.\r\n#> Caused by warning:\r\n#> ! The `...` argument of `across()` is deprecated as of dplyr 1.1.0.\r\n#> Supply arguments directly to `.fns` through an anonymous function instead.\r\n#> \r\n#>   # Previously\r\n#>   across(a:b, mean, na.rm = TRUE)\r\n#> \r\n#>   # Now\r\n#>   across(a:b, \\(x) mean(x, na.rm = TRUE))\r\n#> This warning is displayed once every 8 hours.\r\n#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was\r\n#> generated.\r\n#> ---\r\n#> Backtrace:\r\n#>     ▆\r\n#>  1. ├─dplyr::mutate(df, across(x, mean, na.rm = TRUE))\r\n#>  2. ├─dplyr:::mutate.data.frame(df, across(x, mean, na.rm = TRUE)) at dplyr/R/mutate.R:146:3\r\n#>  3. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by) at dplyr/R/mutate.R:181:3\r\n#>  4. │   ├─base::withCallingHandlers(...) at dplyr/R/mutate.R:268:3\r\n#>  5. │   └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns) at dplyr/R/mutate.R:273:7\r\n#>  6. │     └─mask$eval_all_mutate(quo) at dplyr/R/mutate.R:380:9\r\n#>  7. │       └─dplyr (local) eval() at dplyr/R/data-mask.R:94:7\r\n#>  8. └─dplyr::across(x, mean, na.rm = TRUE)\r\n```\r\n\r\n<sup>Created on 2023-11-03 with [reprex v2.0.2](https://reprex.tidyverse.org)<\/sup>",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6952/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6952/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6943",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6943/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6943/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6943/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6943",
#>     "id": 1961317705,
#>     "node_id": "I_kwDOAGIUpc5051VJ",
#>     "number": 6943,
#>     "title": "condition handling ignores locally set options",
#>     "user": {
#>       "login": "moodymudskipper",
#>       "id": 18351714,
#>       "node_id": "MDQ6VXNlcjE4MzUxNzE0",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/18351714?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/moodymudskipper",
#>       "html_url": "https://github.com/moodymudskipper",
#>       "followers_url": "https://api.github.com/users/moodymudskipper/followers",
#>       "following_url": "https://api.github.com/users/moodymudskipper/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/moodymudskipper/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/moodymudskipper/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/moodymudskipper/subscriptions",
#>       "organizations_url": "https://api.github.com/users/moodymudskipper/orgs",
#>       "repos_url": "https://api.github.com/users/moodymudskipper/repos",
#>       "events_url": "https://api.github.com/users/moodymudskipper/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/moodymudskipper/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [
#>       {
#>         "id": 17708198,
#>         "node_id": "MDU6TGFiZWwxNzcwODE5OA==",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/bug",
#>         "name": "bug",
#>         "color": "E0B3A2",
#>         "default": true,
#>         "description": "an unexpected problem or unintended behavior"
#>       }
#>     ],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 1,
#>     "created_at": "2023-10-25T12:33:55Z",
#>     "updated_at": "2024-03-27T17:00:27Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "Maybe because of a delayed evaluation issue ?\r\n\r\n``` r\r\nbugged <- function() {\r\n  withr::local_options(warn = 2)\r\n  rlang::warn(\"oops\") # or warning(\"oops\")\r\n  24\r\n}\r\n\r\n# as expected\r\n\r\nbugged()\r\n#> Error: (converted from warning) oops\r\nsubset(cars, speed == bugged())\r\n#> Error: (converted from warning) oops\r\n\r\n# unexpected\r\n\r\ndplyr::filter(cars, speed == bugged())\r\n#> Warning: There was 1 warning in `dplyr::filter()`.\r\n#> ℹ In argument: `speed == bugged()`.\r\n#> Caused by warning:\r\n#> ! oops\r\n#>   speed dist\r\n#> 1    24   70\r\n#> 2    24   92\r\n#> 3    24   93\r\n#> 4    24  120\r\n```\r\n\r\n<sup>Created on 2023-10-25 with [reprex v2.0.2](https://reprex.tidyverse.org)<\/sup>\r\n",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6943/reactions",
#>       "total_count": 1,
#>       "+1": 1,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6943/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6942",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6942/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6942/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6942/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/pull/6942",
#>     "id": 1951021595,
#>     "node_id": "PR_kwDOAGIUpc5dNZSf",
#>     "number": 6942,
#>     "title": "Uptaded documentation on rows_append and rows_insert, issue #6864",
#>     "user": {
#>       "login": "hsalberti",
#>       "id": 76076260,
#>       "node_id": "MDQ6VXNlcjc2MDc2MjYw",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/76076260?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/hsalberti",
#>       "html_url": "https://github.com/hsalberti",
#>       "followers_url": "https://api.github.com/users/hsalberti/followers",
#>       "following_url": "https://api.github.com/users/hsalberti/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/hsalberti/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/hsalberti/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/hsalberti/subscriptions",
#>       "organizations_url": "https://api.github.com/users/hsalberti/orgs",
#>       "repos_url": "https://api.github.com/users/hsalberti/repos",
#>       "events_url": "https://api.github.com/users/hsalberti/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/hsalberti/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 0,
#>     "created_at": "2023-10-19T01:34:19Z",
#>     "updated_at": "2023-10-19T01:34:19Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "draft": false,
#>     "pull_request": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/pulls/6942",
#>       "html_url": "https://github.com/tidyverse/dplyr/pull/6942",
#>       "diff_url": "https://github.com/tidyverse/dplyr/pull/6942.diff",
#>       "patch_url": "https://github.com/tidyverse/dplyr/pull/6942.patch",
#>       "merged_at": {}
#>     },
#>     "body": "https://github.com/tidyverse/dplyr/issues/6864\r\nSolved this issue! Looking forward for a response",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6942/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6942/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6939",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6939/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6939/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6939/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6939",
#>     "id": 1935721054,
#>     "node_id": "I_kwDOAGIUpc5zYMJe",
#>     "number": 6939,
#>     "title": "`Error in vapply(.x, .f, .mold, ..., USE.NAMES = FALSE)`: cli_warn together with dplyr grouping results in error.",
#>     "user": {
#>       "login": "lschneiderbauer",
#>       "id": 422100,
#>       "node_id": "MDQ6VXNlcjQyMjEwMA==",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/422100?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/lschneiderbauer",
#>       "html_url": "https://github.com/lschneiderbauer",
#>       "followers_url": "https://api.github.com/users/lschneiderbauer/followers",
#>       "following_url": "https://api.github.com/users/lschneiderbauer/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/lschneiderbauer/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/lschneiderbauer/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/lschneiderbauer/subscriptions",
#>       "organizations_url": "https://api.github.com/users/lschneiderbauer/orgs",
#>       "repos_url": "https://api.github.com/users/lschneiderbauer/repos",
#>       "events_url": "https://api.github.com/users/lschneiderbauer/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/lschneiderbauer/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [
#>       {
#>         "id": 17708198,
#>         "node_id": "MDU6TGFiZWwxNzcwODE5OA==",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/bug",
#>         "name": "bug",
#>         "color": "E0B3A2",
#>         "default": true,
#>         "description": "an unexpected problem or unintended behavior"
#>       }
#>     ],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 1,
#>     "created_at": "2023-10-10T16:09:09Z",
#>     "updated_at": "2023-11-06T15:22:08Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "Hi,\r\n\r\nit took me a while to get to this (very artificial) reduced example, but I managed to get it: For some reason, using `cli::warn()` inside a nested and grouped mutate function results in the described error.\r\n\r\nRemoving `cli_warn()` also removes the error and results in a sane answer.\r\n\r\nI am using R 4.2.1, with dplyr 1.1.3 and cli 3.6.1.\r\n\r\n---\r\n\r\nBrief description of the problem\r\n\r\n``` r\r\nlibrary(cli)\r\nlibrary(dplyr)\r\n#> \r\n#> Attache Paket: 'dplyr'\r\n#> Die folgenden Objekte sind maskiert von 'package:stats':\r\n#> \r\n#>     filter, lag\r\n#> Die folgenden Objekte sind maskiert von 'package:base':\r\n#> \r\n#>     intersect, setdiff, setequal, union\r\n\r\nsome_warning <- function() {\r\n  cli::cli_warn(\"some warning\")\r\n  return(1)\r\n}\r\n\r\ncreate_new_col <- function() {\r\n  tibble(col = TRUE) |>\r\n    mutate(\r\n      new_col = some_warning(),\r\n      .by = col\r\n    ) |>\r\n    pull(new_col)\r\n}\r\n\r\ntibble(group = TRUE) |>\r\n  mutate(new_col = create_new_col(), .by = group)\r\n#> Error in vapply(.x, .f, .mold, ..., USE.NAMES = FALSE): Werte müssen die Länge 1 haben,\r\n#> Ergebnis von FUN(X[[1]]) hat aber Länge 0\r\n```\r\n\r\n<sup>Created on 2023-10-10 with [reprex v2.0.2](https://reprex.tidyverse.org)<\/sup>\r\n\r\n",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6939/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6939/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6934",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6934/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6934/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6934/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6934",
#>     "id": 1922262606,
#>     "node_id": "I_kwDOAGIUpc5yk2ZO",
#>     "number": 6934,
#>     "title": "When `.unpack = TRUE`, `.names` should delay its column name uniqueness check",
#>     "user": {
#>       "login": "DavisVaughan",
#>       "id": 19150088,
#>       "node_id": "MDQ6VXNlcjE5MTUwMDg4",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/19150088?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/DavisVaughan",
#>       "html_url": "https://github.com/DavisVaughan",
#>       "followers_url": "https://api.github.com/users/DavisVaughan/followers",
#>       "following_url": "https://api.github.com/users/DavisVaughan/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/DavisVaughan/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/DavisVaughan/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/DavisVaughan/subscriptions",
#>       "organizations_url": "https://api.github.com/users/DavisVaughan/orgs",
#>       "repos_url": "https://api.github.com/users/DavisVaughan/repos",
#>       "events_url": "https://api.github.com/users/DavisVaughan/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/DavisVaughan/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [
#>       {
#>         "id": 17708200,
#>         "node_id": "MDU6TGFiZWwxNzcwODIwMA==",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/feature",
#>         "name": "feature",
#>         "color": "B4C3AE",
#>         "default": false,
#>         "description": "a feature request or enhancement"
#>       },
#>       {
#>         "id": 3407329987,
#>         "node_id": "LA_kwDOAGIUpc7LF7rD",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/columns%20%E2%86%94%EF%B8%8F",
#>         "name": "columns ↔️",
#>         "color": "eeeeee",
#>         "default": false,
#>         "description": "Operations on columns: mutate(), select(),  rename(), relocate()"
#>       }
#>     ],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 0,
#>     "created_at": "2023-10-02T16:38:23Z",
#>     "updated_at": "2023-10-02T16:38:23Z",
#>     "closed_at": {},
#>     "author_association": "MEMBER",
#>     "active_lock_reason": {},
#>     "body": "Extracted from https://github.com/tidyverse/dplyr/issues/6933\r\n\r\nSometimes the function you apply in `across()` returns a tibble who's column names already uniquely identify that function (`TTR::TDI()` or `TTR::MACD()`), so you don't need to name the `list()` as that would be repetitive, and you don't need the `_1` or `_2` you get automatically.\r\n\r\nIt would be nice if you could set `.names = \"{.col}_\"` when `.unpack = TRUE` to handle this special case, but that runs the name uniqueness check too early. It creates two names called `var1_`, which do eventually get resolved _after_ the unpacking is done, and a second name uniqueness check is already done in `df_unpack()`, so I think we can skip the ones in `across_setup()` when `.unpack = TRUE`.\r\n\r\nEasiest way to do this is the probably give `across_setup()` a `name_repair` argument that we can set to `\"minimal\"` when `.unpack = TRUE`.\r\n\r\n``` r\r\nlibrary(dplyr, warn.conflicts = FALSE)\r\n\r\ndf <- tibble(\r\n  var1 = seq(1, 100, 1)\r\n)\r\n\r\nmetric_a <- function(x) {\r\n  tibble::tibble(a = x, a_info = x + 1)\r\n}\r\nmetric_b <- function(x) {\r\n  tibble::tibble(b = x, b_info = x + 1)\r\n}\r\n\r\n# dont need 1 and 2 here\r\ndf |>\r\n  mutate(across(\r\n    var1,\r\n    list(\r\n      \\(.x) metric_a(.x),\r\n      \\(.x) metric_b(.x)\r\n    ),\r\n    .unpack = TRUE\r\n  ))\r\n#> # A tibble: 100 × 5\r\n#>     var1 var1_1_a var1_1_a_info var1_2_b var1_2_b_info\r\n#>    <dbl>    <dbl>         <dbl>    <dbl>         <dbl>\r\n#>  1     1        1             2        1             2\r\n#>  2     2        2             3        2             3\r\n#>  3     3        3             4        3             4\r\n#>  4     4        4             5        4             5\r\n#>  5     5        5             6        5             6\r\n#>  6     6        6             7        6             7\r\n#>  7     7        7             8        7             8\r\n#>  8     8        8             9        8             9\r\n#>  9     9        9            10        9            10\r\n#> 10    10       10            11       10            11\r\n#> # ℹ 90 more rows\r\n\r\n# this is also repetitive\r\ndf |>\r\n  mutate(across(\r\n    var1,\r\n    list(\r\n      a = \\(.x) metric_a(.x),\r\n      b = \\(.x) metric_b(.x)\r\n    ),\r\n    .unpack = TRUE\r\n  ))\r\n#> # A tibble: 100 × 5\r\n#>     var1 var1_a_a var1_a_a_info var1_b_b var1_b_b_info\r\n#>    <dbl>    <dbl>         <dbl>    <dbl>         <dbl>\r\n#>  1     1        1             2        1             2\r\n#>  2     2        2             3        2             3\r\n#>  3     3        3             4        3             4\r\n#>  4     4        4             5        4             5\r\n#>  5     5        5             6        5             6\r\n#>  6     6        6             7        6             7\r\n#>  7     7        7             8        7             8\r\n#>  8     8        8             9        8             9\r\n#>  9     9        9            10        9            10\r\n#> 10    10       10            11       10            11\r\n#> # ℹ 90 more rows\r\n\r\n# ideally:\r\ndf |>\r\n  mutate(across(\r\n    var1,\r\n    list(\r\n      a = \\(.x) metric_a(.x),\r\n      b = \\(.x) metric_b(.x)\r\n    ),\r\n    .names = \"{.col}_\",\r\n    .unpack = TRUE\r\n  ))\r\n#> Error in `mutate()`:\r\n#> ℹ In argument: `across(...)`.\r\n#> Caused by error in `across()`:\r\n#> ! Names must be unique.\r\n#> ✖ These names are duplicated:\r\n#>   * \"var1_\" at locations 1 and 2.\r\n#> Backtrace:\r\n#>      ▆\r\n#>   1. ├─dplyr::mutate(...)\r\n#>   2. ├─dplyr:::mutate.data.frame(...)\r\n#>   3. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)\r\n#>   4. │   ├─base::withCallingHandlers(...)\r\n#>   5. │   └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)\r\n#>   6. │     └─mask$eval_all_mutate(quo)\r\n#>   7. │       └─dplyr (local) eval()\r\n#>   8. └─dplyr::across(...)\r\n#>   9.   └─dplyr:::across_setup(...)\r\n#>  10.     └─vctrs::vec_as_names(...)\r\n#>  11.       └─vctrs (local) `<fn>`()\r\n#>  12.         └─vctrs:::validate_unique(names = names, arg = arg, call = call)\r\n#>  13.           └─vctrs:::stop_names_must_be_unique(names, arg, call = call)\r\n#>  14.             └─vctrs:::stop_names(...)\r\n#>  15.               └─vctrs:::stop_vctrs(...)\r\n#>  16.                 └─rlang::abort(message, class = c(class, \"vctrs_error\"), ..., call = call)\r\n```\r\n\r\n<sup>Created on 2023-10-02 with [reprex v2.0.2](https://reprex.tidyverse.org)<\/sup>",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6934/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6934/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6921",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6921/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6921/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6921/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6921",
#>     "id": 1874567994,
#>     "node_id": "I_kwDOAGIUpc5vu6M6",
#>     "number": 6921,
#>     "title": "bug in `dplyr::near`?",
#>     "user": {
#>       "login": "kaz462",
#>       "id": 47867131,
#>       "node_id": "MDQ6VXNlcjQ3ODY3MTMx",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/47867131?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/kaz462",
#>       "html_url": "https://github.com/kaz462",
#>       "followers_url": "https://api.github.com/users/kaz462/followers",
#>       "following_url": "https://api.github.com/users/kaz462/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/kaz462/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/kaz462/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/kaz462/subscriptions",
#>       "organizations_url": "https://api.github.com/users/kaz462/orgs",
#>       "repos_url": "https://api.github.com/users/kaz462/repos",
#>       "events_url": "https://api.github.com/users/kaz462/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/kaz462/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [
#>       {
#>         "id": 674867158,
#>         "node_id": "MDU6TGFiZWw2NzQ4NjcxNTg=",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/documentation",
#>         "name": "documentation",
#>         "color": "CBBAB8",
#>         "default": true,
#>         "description": ""
#>       }
#>     ],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 6,
#>     "created_at": "2023-08-31T00:49:25Z",
#>     "updated_at": "2023-11-06T14:48:33Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "Is the following example a bug in `near`?\r\n```r\r\n> near(1.1 * 100 * 10^200, 110 * 10^200)\r\n[1] FALSE\r\n```\r\n_Originally posted by @bundfussr in https://github.com/pharmaverse/admiral/issues/2060#issuecomment-1691876301_\r\n\r\nThe same example works as expected with `base::all.equal()`\r\n```r\r\n> all.equal(1.1 * 100 * 10^200, 110 * 10^200)\r\n[1] TRUE\r\n```       ",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6921/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6921/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6915",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6915/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6915/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6915/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6915",
#>     "id": 1858206506,
#>     "node_id": "I_kwDOAGIUpc5uwfsq",
#>     "number": 6915,
#>     "title": "FR: `rows_clean()`?",
#>     "user": {
#>       "login": "krlmlr",
#>       "id": 1741643,
#>       "node_id": "MDQ6VXNlcjE3NDE2NDM=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/1741643?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/krlmlr",
#>       "html_url": "https://github.com/krlmlr",
#>       "followers_url": "https://api.github.com/users/krlmlr/followers",
#>       "following_url": "https://api.github.com/users/krlmlr/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/krlmlr/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/krlmlr/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/krlmlr/subscriptions",
#>       "organizations_url": "https://api.github.com/users/krlmlr/orgs",
#>       "repos_url": "https://api.github.com/users/krlmlr/repos",
#>       "events_url": "https://api.github.com/users/krlmlr/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/krlmlr/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [
#>       {
#>         "id": 17708200,
#>         "node_id": "MDU6TGFiZWwxNzcwODIwMA==",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/feature",
#>         "name": "feature",
#>         "color": "B4C3AE",
#>         "default": false,
#>         "description": "a feature request or enhancement"
#>       },
#>       {
#>         "id": 3407327207,
#>         "node_id": "LA_kwDOAGIUpc7LF6_n",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/rows%20%E2%86%95%EF%B8%8F",
#>         "name": "rows ↕️",
#>         "color": "eeeeee",
#>         "default": false,
#>         "description": "Operations on rows: filter(), slice(), arrange()"
#>       }
#>     ],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 0,
#>     "created_at": "2023-08-20T17:27:26Z",
#>     "updated_at": "2023-11-06T14:47:31Z",
#>     "closed_at": {},
#>     "author_association": "MEMBER",
#>     "active_lock_reason": {},
#>     "body": "Do we want to add a function that clears all rows to the `rows_*()` family? For data frames, this is `df[0, ]`, but this will be useful for databases and `in_place = TRUE` .\r\n\r\nDownstream: https://github.com/cynkra/dm/issues/851.",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6915/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6915/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6909",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6909/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6909/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6909/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/pull/6909",
#>     "id": 1847851427,
#>     "node_id": "PR_kwDOAGIUpc5XyB0w",
#>     "number": 6909,
#>     "title": "Materialize results in collect()",
#>     "user": {
#>       "login": "krlmlr",
#>       "id": 1741643,
#>       "node_id": "MDQ6VXNlcjE3NDE2NDM=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/1741643?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/krlmlr",
#>       "html_url": "https://github.com/krlmlr",
#>       "followers_url": "https://api.github.com/users/krlmlr/followers",
#>       "following_url": "https://api.github.com/users/krlmlr/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/krlmlr/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/krlmlr/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/krlmlr/subscriptions",
#>       "organizations_url": "https://api.github.com/users/krlmlr/orgs",
#>       "repos_url": "https://api.github.com/users/krlmlr/repos",
#>       "events_url": "https://api.github.com/users/krlmlr/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/krlmlr/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 2,
#>     "created_at": "2023-08-12T08:16:34Z",
#>     "updated_at": "2023-08-24T03:06:56Z",
#>     "closed_at": {},
#>     "author_association": "MEMBER",
#>     "active_lock_reason": {},
#>     "draft": false,
#>     "pull_request": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/pulls/6909",
#>       "html_url": "https://github.com/tidyverse/dplyr/pull/6909",
#>       "diff_url": "https://github.com/tidyverse/dplyr/pull/6909.diff",
#>       "patch_url": "https://github.com/tidyverse/dplyr/pull/6909.patch",
#>       "merged_at": {}
#>     },
#>     "body": "for duckplyr.",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6909/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6909/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6906",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6906/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6906/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6906/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6906",
#>     "id": 1839401013,
#>     "node_id": "I_kwDOAGIUpc5towg1",
#>     "number": 6906,
#>     "title": "Add a `ptype` argument to `between()` since we can't make it cast to the type of `x` at this time",
#>     "user": {
#>       "login": "Generalized",
#>       "id": 60151643,
#>       "node_id": "MDQ6VXNlcjYwMTUxNjQz",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/60151643?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/Generalized",
#>       "html_url": "https://github.com/Generalized",
#>       "followers_url": "https://api.github.com/users/Generalized/followers",
#>       "following_url": "https://api.github.com/users/Generalized/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/Generalized/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/Generalized/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/Generalized/subscriptions",
#>       "organizations_url": "https://api.github.com/users/Generalized/orgs",
#>       "repos_url": "https://api.github.com/users/Generalized/repos",
#>       "events_url": "https://api.github.com/users/Generalized/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/Generalized/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [
#>       {
#>         "id": 17708200,
#>         "node_id": "MDU6TGFiZWwxNzcwODIwMA==",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/feature",
#>         "name": "feature",
#>         "color": "B4C3AE",
#>         "default": false,
#>         "description": "a feature request or enhancement"
#>       },
#>       {
#>         "id": 544019342,
#>         "node_id": "MDU6TGFiZWw1NDQwMTkzNDI=",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/vctrs%20%E2%86%97%EF%B8%8F",
#>         "name": "vctrs ↗️",
#>         "color": "eeeeee",
#>         "default": false,
#>         "description": ""
#>       }
#>     ],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 4,
#>     "created_at": "2023-08-07T12:55:59Z",
#>     "updated_at": "2023-11-06T14:08:46Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "The result of using `between()` in filtering is not equivalent to evaluating a conditional expression when working with ordered factors.\r\n\r\n```{r}\r\n> (x <- data.frame(Visit = c(\"Discharge\", \"Month 3\", \"Month 6\", \"Month 12\", \"Month 20\")))\r\n      Visit\r\n1 Discharge\r\n2   Month 3\r\n3   Month 6\r\n4  Month 12\r\n5  Month 20\r\n\r\n> class(x$Visit)\r\n[1] \"character\"\r\n```\r\n\r\nNow let's make it an ordered factor with assumed levels (used later for other operations):\r\n```{r}\r\n> (x$Visit <- factor(x$Visit, levels = c(\"Baseline\", \"Discharge\", \"Month 3\", \"Month 6\", \"Month 12\", \"Month 20\", \"Premature\"), ordered = TRUE))\r\n[1] Discharge Month 3   Month 6   Month 12  Month 20 \r\nLevels: Baseline < Discharge < Month 3 < Month 6 < Month 12 < Month 20 < Premature\r\n```\r\n\r\nWhen filtering using the conjunction of conditions it works\r\n```{r}\r\n> x %>% filter(Visit >= \"Discharge\" & Visit <= \"Month 20\")\r\n      Visit\r\n1 Discharge\r\n2   Month 3\r\n3   Month 6\r\n4  Month 12\r\n5  Month 20\r\n```\r\nWhen using the convenient between(), it doesn't\r\n```{r}\r\n> x %>% filter(between(Visit, \"Discharge\", \"Month 20\"))\r\n      Visit\r\n1 Discharge\r\n2  Month 12\r\n3  Month 20\r\n```\r\n2 items are missing in the output.\r\n\r\n-----\r\nR version 4.2.0 (2022-04-22 ucrt)\r\nPlatform: x86_64-w64-mingw32/x64 (64-bit)\r\nRunning under: Windows 10 x64 (build 19045)\r\n\r\n> packageVersion(\"dplyr\")\r\n[1] ‘1.1.1’",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6906/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6906/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6905",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6905/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6905/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6905/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6905",
#>     "id": 1839123639,
#>     "node_id": "I_kwDOAGIUpc5tnsy3",
#>     "number": 6905,
#>     "title": "`bind_rows()` for database tables",
#>     "user": {
#>       "login": "mgirlich",
#>       "id": 18258854,
#>       "node_id": "MDQ6VXNlcjE4MjU4ODU0",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/18258854?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/mgirlich",
#>       "html_url": "https://github.com/mgirlich",
#>       "followers_url": "https://api.github.com/users/mgirlich/followers",
#>       "following_url": "https://api.github.com/users/mgirlich/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/mgirlich/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/mgirlich/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/mgirlich/subscriptions",
#>       "organizations_url": "https://api.github.com/users/mgirlich/orgs",
#>       "repos_url": "https://api.github.com/users/mgirlich/repos",
#>       "events_url": "https://api.github.com/users/mgirlich/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/mgirlich/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [
#>       {
#>         "id": 17708200,
#>         "node_id": "MDU6TGFiZWwxNzcwODIwMA==",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/feature",
#>         "name": "feature",
#>         "color": "B4C3AE",
#>         "default": false,
#>         "description": "a feature request or enhancement"
#>       },
#>       {
#>         "id": 3407327207,
#>         "node_id": "LA_kwDOAGIUpc7LF6_n",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/rows%20%E2%86%95%EF%B8%8F",
#>         "name": "rows ↕️",
#>         "color": "eeeeee",
#>         "default": false,
#>         "description": "Operations on rows: filter(), slice(), arrange()"
#>       }
#>     ],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 1,
#>     "created_at": "2023-08-07T10:06:08Z",
#>     "updated_at": "2023-11-06T14:38:30Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "It would be nice if `bind_rows()` would work for database tables.\r\n\r\n``` r\r\nlibrary(dplyr, warn.conflicts = FALSE)\r\nlibrary(purrr)\r\ncon <- DBI::dbConnect(RSQLite::SQLite(), \":memory:\")\r\n\r\n# Create random slices of mtcars\r\ntables <-\r\n  1:5 |>\r\n  map(function(n) {\r\n    tbl_name <- paste0(\"mtcars_\", n)\r\n    copy_to(con, slice_sample(mtcars, n = 3), tbl_name)\r\n\r\n    tbl(con, tbl_name)\r\n  })\r\nbind_rows(!!!tables)\r\n#> Error in `bind_rows()`:\r\n#> ! Argument 1 must be a data frame or a named atomic vector.\r\n#> Backtrace:\r\n#>     ▆\r\n#>  1. └─dplyr::bind_rows(!!!tables)\r\n#>  2.   └─rlang::abort(glue(\"Argument {i} must be a data frame or a named atomic vector.\"))\r\n```\r\n\r\n<sup>Created on 2023-08-07 with [reprex v2.0.2](https://reprex.tidyverse.org)<\/sup>\r\n\r\nI know there were issues with the double dispatch and what happens if local tables and database tables are mixed.\r\nBut I think it would be sufficient if either all inputs are local tables or database tables.\r\nThis was also requested again in dbplyr: https://github.com/tidyverse/dbplyr/issues/1342.",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6905/reactions",
#>       "total_count": 7,
#>       "+1": 7,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6905/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   }
#> ] 
gh("/repos/{owner}/{repo}/issues", owner = "hadley", repo = "dplyr")
#> [
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/7006",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7006/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7006/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7006/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/7006",
#>     "id": 2213499488,
#>     "node_id": "I_kwDOAGIUpc6D71Jg",
#>     "number": 7006,
#>     "title": "Clarity of \"duplicated\" error message in `rename_with()`",
#>     "user": {
#>       "login": "DanChaltiel",
#>       "id": 15105152,
#>       "node_id": "MDQ6VXNlcjE1MTA1MTUy",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/15105152?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/DanChaltiel",
#>       "html_url": "https://github.com/DanChaltiel",
#>       "followers_url": "https://api.github.com/users/DanChaltiel/followers",
#>       "following_url": "https://api.github.com/users/DanChaltiel/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/DanChaltiel/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/DanChaltiel/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/DanChaltiel/subscriptions",
#>       "organizations_url": "https://api.github.com/users/DanChaltiel/orgs",
#>       "repos_url": "https://api.github.com/users/DanChaltiel/repos",
#>       "events_url": "https://api.github.com/users/DanChaltiel/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/DanChaltiel/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 0,
#>     "created_at": "2024-03-28T15:19:35Z",
#>     "updated_at": "2024-03-28T15:19:35Z",
#>     "closed_at": {},
#>     "author_association": "CONTRIBUTOR",
#>     "active_lock_reason": {},
#>     "body": "Hi,  \r\n\r\nWhen using `rename_with()` and ending with duplicated column names, the error message tells us about the transformed, duplicated name and the location of the original columns.\r\n\r\nHowever, it would be much clearer to have the original column names in the error message.\r\n\r\nThe locations are not of much help if `rename_with()` is used in a long pipeline, nor is the transformed name if the function is not well described.\r\n\r\nHere is an example case:\r\n\r\n``` r\r\nlibrary(tidyverse)\r\nletter_sum = function(x){\r\n  x %>% map_chr(~{str_split_1(.x, \"\") %>% map_int(~which(letters==tolower(.x))) %>% sum() %>% as.character()})\r\n}\r\nmtcars %>% rename_with(letter_sum)\r\n#> Error in `rename_with()`:\r\n#> ! Names must be unique.\r\n#> x These names are duplicated:\r\n#>   * \"24\" at locations 4 and 11.\r\n#>   * \"43\" at locations 5 and 6.\r\n```\r\n\r\n<sup>Created on 2024-03-28 with [reprex v2.1.0](https://reprex.tidyverse.org)<\/sup>\r\n\r\nWhile I admit the transformation is exaggeratedly nonsensical, it shows that the error is not very useful in such cases.\r\n",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/7006/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7006/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/7004",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7004/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7004/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7004/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/7004",
#>     "id": 2190838274,
#>     "node_id": "I_kwDOAGIUpc6ClYoC",
#>     "number": 7004,
#>     "title": "dplyr 1.1.4 breaks on empty dataframes constructed from matrices",
#>     "user": {
#>       "login": "john-b-edwards",
#>       "id": 9289685,
#>       "node_id": "MDQ6VXNlcjkyODk2ODU=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/9289685?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/john-b-edwards",
#>       "html_url": "https://github.com/john-b-edwards",
#>       "followers_url": "https://api.github.com/users/john-b-edwards/followers",
#>       "following_url": "https://api.github.com/users/john-b-edwards/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/john-b-edwards/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/john-b-edwards/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/john-b-edwards/subscriptions",
#>       "organizations_url": "https://api.github.com/users/john-b-edwards/orgs",
#>       "repos_url": "https://api.github.com/users/john-b-edwards/repos",
#>       "events_url": "https://api.github.com/users/john-b-edwards/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/john-b-edwards/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 1,
#>     "created_at": "2024-03-17T19:55:39Z",
#>     "updated_at": "2024-03-21T19:01:45Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "Previous versions of dplyr would allow you to manipulate empty dataframes that had been constructed from empty matrices, e.g.\r\n\r\n```r\r\npackageurl <- \"https://cran.r-project.org/src/contrib/Archive/dplyr/dplyr_1.1.3.tar.gz\"\r\ninstall.packages(packageurl, repos=NULL, type=\"source\")\r\n#> Installing package into 'C:/Users/edwar/Documents/R/win-library/4.1'\r\n#> (as 'lib' is unspecified)\r\npackageVersion('dplyr')\r\n#> [1] '1.1.3'\r\nas.data.frame(matrix(nrow = 0, ncol = 0)) |> dplyr::slice(1)\r\n#> data frame with 0 columns and 0 rows\r\n```\r\n\r\nIn dplyr 1.1.4, this code causes an internal error:\r\n\r\n```r\r\npackageurl <- \"https://cran.r-project.org/src/contrib/dplyr_1.1.4.tar.gz\"\r\ninstall.packages(packageurl, repos=NULL, type=\"source\")\r\n#> Installing package into 'C:/Users/edwar/Documents/R/win-library/4.1'\r\n#> (as 'lib' is unspecified)\r\npackageVersion('dplyr')\r\n#> [1] '1.1.4'\r\nas.data.frame(matrix(nrow = 0, ncol = 0)) |> dplyr::slice(1)\r\n#> Error: Internal error: `template` must have a `names` attribute.\r\n```\r\n\r\nBoth versions are able to reliably manipulate empty dataframes that were not constructed from matrices (e.g. `data.frame() |> dplyr::slice(1)` works just fine).",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/7004/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7004/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/7002",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7002/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7002/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7002/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/pull/7002",
#>     "id": 2180947521,
#>     "node_id": "PR_kwDOAGIUpc5pV2Vm",
#>     "number": 7002,
#>     "title": "Update snapshots for tidyselect 1.2.1",
#>     "user": {
#>       "login": "lionel-",
#>       "id": 4465050,
#>       "node_id": "MDQ6VXNlcjQ0NjUwNTA=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/4465050?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/lionel-",
#>       "html_url": "https://github.com/lionel-",
#>       "followers_url": "https://api.github.com/users/lionel-/followers",
#>       "following_url": "https://api.github.com/users/lionel-/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/lionel-/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/lionel-/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/lionel-/subscriptions",
#>       "organizations_url": "https://api.github.com/users/lionel-/orgs",
#>       "repos_url": "https://api.github.com/users/lionel-/repos",
#>       "events_url": "https://api.github.com/users/lionel-/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/lionel-/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 1,
#>     "created_at": "2024-03-12T07:48:43Z",
#>     "updated_at": "2024-03-12T08:03:58Z",
#>     "closed_at": {},
#>     "author_association": "MEMBER",
#>     "active_lock_reason": {},
#>     "draft": false,
#>     "pull_request": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/pulls/7002",
#>       "html_url": "https://github.com/tidyverse/dplyr/pull/7002",
#>       "diff_url": "https://github.com/tidyverse/dplyr/pull/7002.diff",
#>       "patch_url": "https://github.com/tidyverse/dplyr/pull/7002.patch",
#>       "merged_at": {}
#>     },
#>     "body": "For:\r\n\r\n- https://github.com/r-lib/tidyselect/pull/326\r\n- https://github.com/r-lib/tidyselect/commit/1822141ae972ee23a2f307855583f9728bac3a8e",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/7002/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7002/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/7001",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7001/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7001/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7001/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/7001",
#>     "id": 2175247275,
#>     "node_id": "I_kwDOAGIUpc6Bp6Or",
#>     "number": 7001,
#>     "title": "Internal: slightly inaccurate `as_join_by()` implementation for character",
#>     "user": {
#>       "login": "krlmlr",
#>       "id": 1741643,
#>       "node_id": "MDQ6VXNlcjE3NDE2NDM=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/1741643?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/krlmlr",
#>       "html_url": "https://github.com/krlmlr",
#>       "followers_url": "https://api.github.com/users/krlmlr/followers",
#>       "following_url": "https://api.github.com/users/krlmlr/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/krlmlr/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/krlmlr/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/krlmlr/subscriptions",
#>       "organizations_url": "https://api.github.com/users/krlmlr/orgs",
#>       "repos_url": "https://api.github.com/users/krlmlr/repos",
#>       "events_url": "https://api.github.com/users/krlmlr/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/krlmlr/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 8,
#>     "created_at": "2024-03-08T04:15:19Z",
#>     "updated_at": "2024-03-22T07:56:02Z",
#>     "closed_at": {},
#>     "author_association": "MEMBER",
#>     "active_lock_reason": {},
#>     "body": "``` r\r\nwaldo::compare(dplyr:::as_join_by(\"a\"), dplyr::join_by(a == a))\r\n#> `old$exprs[[1]]`: `\"a\" == \"a\"`\r\n#> `new$exprs[[1]]`: `a == a`\r\n```\r\n\r\n<sup>Created on 2024-03-08 with [reprex v2.1.0](https://reprex.tidyverse.org)<\/sup>\r\n\r\nI can work around, but I wonder if this may cause some downstream gotchas.",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/7001/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/7001/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6999",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6999/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6999/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6999/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/pull/6999",
#>     "id": 2173662568,
#>     "node_id": "PR_kwDOAGIUpc5o9Iio",
#>     "number": 6999,
#>     "title": "docs: Improve `?group_by_prepare`",
#>     "user": {
#>       "login": "krlmlr",
#>       "id": 1741643,
#>       "node_id": "MDQ6VXNlcjE3NDE2NDM=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/1741643?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/krlmlr",
#>       "html_url": "https://github.com/krlmlr",
#>       "followers_url": "https://api.github.com/users/krlmlr/followers",
#>       "following_url": "https://api.github.com/users/krlmlr/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/krlmlr/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/krlmlr/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/krlmlr/subscriptions",
#>       "organizations_url": "https://api.github.com/users/krlmlr/orgs",
#>       "repos_url": "https://api.github.com/users/krlmlr/repos",
#>       "events_url": "https://api.github.com/users/krlmlr/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/krlmlr/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 0,
#>     "created_at": "2024-03-07T11:39:47Z",
#>     "updated_at": "2024-03-07T11:39:47Z",
#>     "closed_at": {},
#>     "author_association": "MEMBER",
#>     "active_lock_reason": {},
#>     "draft": false,
#>     "pull_request": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/pulls/6999",
#>       "html_url": "https://github.com/tidyverse/dplyr/pull/6999",
#>       "diff_url": "https://github.com/tidyverse/dplyr/pull/6999.diff",
#>       "patch_url": "https://github.com/tidyverse/dplyr/pull/6999.patch",
#>       "merged_at": {}
#>     },
#>     "body": {},
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6999/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6999/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6993",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6993/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6993/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6993/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6993",
#>     "id": 2151548779,
#>     "node_id": "I_kwDOAGIUpc6APgdr",
#>     "number": 6993,
#>     "title": "Feature Request: Reduce Boilerplate to Silence Many-to-Many Join Warnings in dplyr",
#>     "user": {
#>       "login": "ryandward",
#>       "id": 6970996,
#>       "node_id": "MDQ6VXNlcjY5NzA5OTY=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/6970996?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/ryandward",
#>       "html_url": "https://github.com/ryandward",
#>       "followers_url": "https://api.github.com/users/ryandward/followers",
#>       "following_url": "https://api.github.com/users/ryandward/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/ryandward/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/ryandward/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/ryandward/subscriptions",
#>       "organizations_url": "https://api.github.com/users/ryandward/orgs",
#>       "repos_url": "https://api.github.com/users/ryandward/repos",
#>       "events_url": "https://api.github.com/users/ryandward/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/ryandward/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 2,
#>     "created_at": "2024-02-23T17:55:53Z",
#>     "updated_at": "2024-03-21T12:31:12Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "**Brief description of the problem:**\r\n\r\nConducting exploratory (_i.e._ not production-environment) data analysis often requires multiple many-to-many joins.  `dplyr`'s current behavior emits warnings for each join when not explicitly specifying `relationship = \"many-to-many\"` and significantly clutter the console output. \r\n\r\nThis behavior introduces verbosity into the exploratory analysis process, where \"many-to-many\" relationships are expected, anticipated, and managed. The repeated need to specify the relationship parameter for each join operation to avoid these warnings is cumbersome and detracts from the efficiency to use `dplyr` as an exploration tool. \r\n\r\nAn option to globally silence these warnings would streamline exploratory data analyses, allowing for a focus on substantive inquiry and result interpretation.\r\n\r\n**Desired output:**\r\n\r\nA global option in `dplyr` to silence warnings for many-to-many joins, enhancing experience by reducing repetitive boilerplate and focusing on relevant outputs.\r\n\r\n**Reprex:**\r\n\r\n```r\r\nlibrary(dplyr)\r\n \r\n    # Example datasets demonstrating the necessity of chained inner_joins\r\n    df1 <- data.frame(key = c(1, 2, 2, 3), value = c(\"A\", \"B\", \"C\", \"D\"))\r\n    df2 <- data.frame(key = c(2, 2, 3, 3, 4), value2 = c(\"W\", \"X\", \"Y\", \"Z\", \"P\"))\r\n    df3 <- data.frame(key = c(2, 3, 3, 4, 5), value3 = c(\"K\", \"L\", \"M\", \"N\", \"O\"))\r\n \r\n    # Chained inner_join operations common in exploratory analysis\r\n    df1 %>%\r\n      inner_join(df2, by = \"key\") %>%\r\n      inner_join(df3, by = \"key\")\r\n\r\n  key value value2 value3\r\n1   2     B      W      K\r\n2   2     B      X      K\r\n3   2     C      W      K\r\n4   2     C      X      K\r\n5   3     D      Y      L\r\n6   3     D      Y      M\r\n7   3     D      Z      L\r\n8   3     D      Z      M\r\nWarning messages:\r\n1: In inner_join(., df2, by = \"key\") :\r\n  Detected an unexpected many-to-many relationship between `x` and `y`.\r\nℹ Row 2 of `x` matches multiple rows in `y`.\r\nℹ Row 1 of `y` matches multiple rows in `x`.\r\nℹ If a many-to-many relationship is expected, set `relationship = \"many-to-many\"` to silence this warning.\r\n2: In inner_join(., df3, by = \"key\") :\r\n  Detected an unexpected many-to-many relationship between `x` and `y`.\r\nℹ Row 5 of `x` matches multiple rows in `y`.\r\nℹ Row 1 of `y` matches multiple rows in `x`.\r\nℹ If a many-to-many relationship is expected, set `relationship = \"many-to-many\"` to silence this warning.\r\n```\r\n\r\nIn the above reprex, joining the objects have duplicate keys results in a many-to-many join, triggering a warning, which is sometimes longer than the output. The proposed feature would allow for operations without the need to explicitly suppress warnings for each operation, assuming a global setting had been enabled.\r\n\r\n## Hypothetical implementation 1\r\n\r\nIntroduce a much faster to type alias, i.e. \"rel\" for \"relationship\" and \"mm\" for \"many-to-many\",  with other options for other relationships.\r\n\r\n```r\r\n    df1 %>%\r\n    inner_join(df2, by = \"key\", rel = 'mm') %>%\r\n    inner_join(df3, by = \"key\", rel = 'mm') \r\n```\r\n\r\n## Hypothetical implementation 2\r\n\r\nIntroduce an option to silence these warnings for a session\r\n\r\n```r\r\noptions(dplyr.silence_many_to_many_warnings = TRUE)\r\n    df1 %>%\r\n    inner_join(df2, by = \"key\") %>%\r\n    inner_join(df3, by = \"key\") \r\n\r\n```\r\n",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6993/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6993/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6992",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6992/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6992/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6992/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6992",
#>     "id": 2146085344,
#>     "node_id": "I_kwDOAGIUpc5_6qng",
#>     "number": 6992,
#>     "title": "Request non-equal join: closest() supports dual-sided inequality <>",
#>     "user": {
#>       "login": "zhjx19",
#>       "id": 21698296,
#>       "node_id": "MDQ6VXNlcjIxNjk4Mjk2",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/21698296?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/zhjx19",
#>       "html_url": "https://github.com/zhjx19",
#>       "followers_url": "https://api.github.com/users/zhjx19/followers",
#>       "following_url": "https://api.github.com/users/zhjx19/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/zhjx19/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/zhjx19/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/zhjx19/subscriptions",
#>       "organizations_url": "https://api.github.com/users/zhjx19/orgs",
#>       "repos_url": "https://api.github.com/users/zhjx19/repos",
#>       "events_url": "https://api.github.com/users/zhjx19/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/zhjx19/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 0,
#>     "created_at": "2024-02-21T08:15:44Z",
#>     "updated_at": "2024-02-21T08:15:44Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "For example, I now have the following Table 1 and Table 2. I want to find a `value2` from both sides that is closest to the `value` based on matching the IDs. However, closest() only supports an inequality involving one of: >, >=, <, or <=.\r\n\r\n```r\r\nlibrary(purrr)\r\nlibrary(dplyr)\r\n#> \r\n#> Attaching package: 'dplyr'\r\n#> The following objects are masked from 'package:stats':\r\n#> \r\n#>     filter, lag\r\n#> The following objects are masked from 'package:base':\r\n#> \r\n#>     intersect, setdiff, setequal, union\r\ndf1 = tibble(\r\n  ID = c(\"NO1\", \"NO1\", \"NO2\", \"NO3\", \"NO3\", \"NO3\", \"NO4\", \"NO5\", \r\n         \"NO5\", \"NO5\", \"NO5\", \"NO6\", \"NO7\", \"NO7\", \"NO7\", \"NO7\", \r\n         \"NO7\", \"NO8\", \"NO9\", \"NO9\"), \r\n  value = c(11, 25, 22, 24, 29, 1.75, 26, 27, 55, 44, 2.1, 31, \r\n         35, 33, 410, 21, 1.44, 80, 75, 52))\r\ndf1\r\n#> # A tibble: 20 × 2\r\n#>    ID    value2\r\n#>    <chr>  <dbl>\r\n#>  1 NO1    11   \r\n#>  2 NO1    25   \r\n#>  3 NO2    22   \r\n#>  4 NO3    24   \r\n#>  5 NO3    29   \r\n#>  6 NO3     1.75\r\n#>  7 NO4    26   \r\n#>  8 NO5    27   \r\n#>  9 NO5    55   \r\n#> 10 NO5    44   \r\n#> 11 NO5     2.1 \r\n#> 12 NO6    31   \r\n#> 13 NO7    35   \r\n#> 14 NO7    33   \r\n#> 15 NO7   410   \r\n#> 16 NO7    21   \r\n#> 17 NO7     1.44\r\n#> 18 NO8    80   \r\n#> 19 NO9    75   \r\n#> 20 NO9    52\r\ndf2 = tibble(\r\n  编号 = c(\"NO1\", \"NO1\", \"NO2\", \"NO3\", \"NO3\", \"NO4\", \"NO5\", \"NO5\", \r\n         \"NO5\", \"NO5\", \"NO6\", \"NO7\", \"NO7\", \"NO7\", \"NO8\", \"NO9\", \"NO9\"), \r\n  数值2 = c(11.2, 24.6, 21.6, 22, 29.5, 26.1, 26.9, 26.4, 54.3,\r\n            42.1, 30.2, 34.7, 31.2, 20.59, 79.8, 74.2, 50.9))\r\ndf2\r\n#> # A tibble: 17 × 2\r\n#>    编号  数值2\r\n#>    <chr> <dbl>\r\n#>  1 NO1    11.2\r\n#>  2 NO1    24.6\r\n#>  3 NO2    21.6\r\n#>  4 NO3    22  \r\n#>  5 NO3    29.5\r\n#>  6 NO4    26.1\r\n#>  7 NO5    26.9\r\n#>  8 NO5    26.4\r\n#>  9 NO5    54.3\r\n#> 10 NO5    42.1\r\n#> 11 NO6    30.2\r\n#> 12 NO7    34.7\r\n#> 13 NO7    31.2\r\n#> 14 NO7    20.6\r\n#> 15 NO8    79.8\r\n#> 16 NO9    74.2\r\n#> 17 NO9    50.9\r\n```\r\n\r\nThe manual method I can think of right now is:\r\n\r\n```r\r\ndf1 %>%\r\n  left_join(df2, join_by(编号), relationship = \"many-to-many\") %>%\r\n  group_nest(编号, 数值) %>%\r\n  mutate(数值2 = map2_dbl(数值, data, \\(x, y) y$数值2[which.min(abs(y$数值2 - x))]),\r\n         误差 = abs(数值 - 数值2)) %>%\r\n  select(-data)\r\n#> # A tibble: 20 × 4\r\n#>    编号    数值 数值2    误差\r\n#>    <chr>  <dbl> <dbl>   <dbl>\r\n#>  1 NO1    11     11.2   0.200\r\n#>  2 NO1    25     24.6   0.400\r\n#>  3 NO2    22     21.6   0.400\r\n#>  4 NO3     1.75  22    20.2  \r\n#>  5 NO3    24     22     2    \r\n#>  6 NO3    29     29.5   0.5  \r\n#>  7 NO4    26     26.1   0.100\r\n#>  8 NO5     2.1   26.4  24.3  \r\n#>  9 NO5    27     26.9   0.100\r\n#> 10 NO5    44     42.1   1.90 \r\n#> 11 NO5    55     54.3   0.700\r\n#> 12 NO6    31     30.2   0.800\r\n#> 13 NO7     1.44  20.6  19.2  \r\n#> 14 NO7    21     20.6   0.41 \r\n#> 15 NO7    33     34.7   1.70 \r\n#> 16 NO7    35     34.7   0.300\r\n#> 17 NO7   410     34.7 375.   \r\n#> 18 NO8    80     79.8   0.200\r\n#> 19 NO9    52     50.9   1.10 \r\n#> 20 NO9    75     74.2   0.800\r\n```",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6992/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6992/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6991",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6991/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6991/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6991/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6991",
#>     "id": 2133878016,
#>     "node_id": "I_kwDOAGIUpc5_MGUA",
#>     "number": 6991,
#>     "title": "Add `tidypolars` to the list of backends?",
#>     "user": {
#>       "login": "etiennebacher",
#>       "id": 52219252,
#>       "node_id": "MDQ6VXNlcjUyMjE5MjUy",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/52219252?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/etiennebacher",
#>       "html_url": "https://github.com/etiennebacher",
#>       "followers_url": "https://api.github.com/users/etiennebacher/followers",
#>       "following_url": "https://api.github.com/users/etiennebacher/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/etiennebacher/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/etiennebacher/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/etiennebacher/subscriptions",
#>       "organizations_url": "https://api.github.com/users/etiennebacher/orgs",
#>       "repos_url": "https://api.github.com/users/etiennebacher/repos",
#>       "events_url": "https://api.github.com/users/etiennebacher/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/etiennebacher/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 0,
#>     "created_at": "2024-02-14T09:14:01Z",
#>     "updated_at": "2024-02-14T09:14:44Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "Hello, I've been working on [`tidypolars`](https://tidypolars.etiennebacher.com/) for a few months. It provides the `tidyverse` syntax while using [`polars`](https://rpolars.github.io/) as backend. `polars` provides functions to manipulate dataframes, but also strings, dates, and many more things. Although `tidypolars` doesn't support all functions from the `tidyverse` for now (`lubridate` support in particular is lagging behind), most of `dplyr`, `tidyr`, and `stringr` functions are covered (some arguments might not be supported yet).\r\n\r\nWould you accept adding `tidypolars` to the [list of backends](https://github.com/tidyverse/dplyr?tab=readme-ov-file#backends) in the README? That would give more visibility to `tidypolars` and would hopefully encourage people to contribute, which would be greatly appreciated given the important number of R / `tidyverse` functions to translate to `polars` syntax.\r\n\r\nHappy to make a PR if so.",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6991/reactions",
#>       "total_count": 2,
#>       "+1": 1,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 1
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6991/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6990",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6990/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6990/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6990/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6990",
#>     "id": 2133291522,
#>     "node_id": "I_kwDOAGIUpc5_J3IC",
#>     "number": 6990,
#>     "title": "Request: Add native pipeline/verb logging option similar to `tidylog` package. ",
#>     "user": {
#>       "login": "orgadish",
#>       "id": 48453207,
#>       "node_id": "MDQ6VXNlcjQ4NDUzMjA3",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/48453207?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/orgadish",
#>       "html_url": "https://github.com/orgadish",
#>       "followers_url": "https://api.github.com/users/orgadish/followers",
#>       "following_url": "https://api.github.com/users/orgadish/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/orgadish/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/orgadish/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/orgadish/subscriptions",
#>       "organizations_url": "https://api.github.com/users/orgadish/orgs",
#>       "repos_url": "https://api.github.com/users/orgadish/repos",
#>       "events_url": "https://api.github.com/users/orgadish/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/orgadish/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 0,
#>     "created_at": "2024-02-13T23:20:35Z",
#>     "updated_at": "2024-02-13T23:20:42Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "The `tidylog` package is an amazing supplement to the `dplyr` and `tidyr` packages. It allows immediate tracking/debugging of a pipeline by giving high-level information on the results of each step in the pipeline (see below). It's _especially_ useful in tracking joins, which I know was an important part of the error and warning handling made to the join functions in dplyr 1.1.0+.\r\n\r\nThe silly example below shows what messages `tidylog` provides about the process. \r\n\r\nI **_always_** use `tidylog` by default and I would love to also teach it to my students. But I don't because it works by masking regular tidyverse verbs with a logging version, which eliminates use of auto-complete. In order to implement auto-complete, the maintainer of the tidylog would have to constantly keep up with tidyverse updates even though they are completely separate (elbersb/tidylog#56)\r\n\r\nIt would be great if this kind of functionality were implemented **natively** and maintained by the relevant teams so that updates to APIs (e.g. new arguments) would also involve updating the log structure.\r\n\r\n``` r\r\nsuppressMessages({\r\n  library(tidyverse)\r\n  library(tidylog)\r\n})\r\n\r\ntbl1 <- dplyr::starwars |> \r\n  filter(height > 90) |> \r\n  select(name, height, mass, hair_color) |> \r\n  summarize(\r\n    across(c(height, mass), mean),\r\n    name_list = list(name),\r\n    .by = hair_color\r\n  )\r\n#> filter: removed 9 rows (10%), 78 rows remaining\r\n#> select: dropped 10 variables (skin_color, eye_color, birth_year, sex, gender, …)\r\n#> summarize: now 12 rows and 4 columns, ungrouped\r\n  \r\ntbl2 <- dplyr::starwars |>\r\n  select(hair_color, films) |> \r\n  unnest_longer(films) |> \r\n  summarize(\r\n    films_list = list(films),\r\n    .by = hair_color\r\n  )\r\n#> select: dropped 12 variables (name, height, mass, skin_color, eye_color, …)\r\n#> summarize: now 12 rows and 2 columns, ungrouped\r\n\r\njoined <- tbl1 |> \r\n  full_join(\r\n    tbl2,\r\n    by = join_by(hair_color)\r\n  )\r\n#> full_join: added one column (films_list)\r\n#>            > rows only in tbl1   0\r\n#>            > rows only in tbl2   0\r\n#>            > matched rows       12\r\n#>            >                   ====\r\n#>            > rows total         12\r\n```\r\n\r\n<sup>Created on 2024-02-13 with [reprex v2.0.2](https://reprex.tidyverse.org)<\/sup>\r\n",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6990/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6990/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6986",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6986/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6986/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6986/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6986",
#>     "id": 2106203600,
#>     "node_id": "I_kwDOAGIUpc59ih3Q",
#>     "number": 6986,
#>     "title": "Update `.groups` message after `group_by() |> summarize()`",
#>     "user": {
#>       "login": "mine-cetinkaya-rundel",
#>       "id": 5965649,
#>       "node_id": "MDQ6VXNlcjU5NjU2NDk=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/5965649?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/mine-cetinkaya-rundel",
#>       "html_url": "https://github.com/mine-cetinkaya-rundel",
#>       "followers_url": "https://api.github.com/users/mine-cetinkaya-rundel/followers",
#>       "following_url": "https://api.github.com/users/mine-cetinkaya-rundel/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/mine-cetinkaya-rundel/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/mine-cetinkaya-rundel/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/mine-cetinkaya-rundel/subscriptions",
#>       "organizations_url": "https://api.github.com/users/mine-cetinkaya-rundel/orgs",
#>       "repos_url": "https://api.github.com/users/mine-cetinkaya-rundel/repos",
#>       "events_url": "https://api.github.com/users/mine-cetinkaya-rundel/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/mine-cetinkaya-rundel/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 0,
#>     "created_at": "2024-01-29T18:52:31Z",
#>     "updated_at": "2024-01-29T18:52:31Z",
#>     "closed_at": {},
#>     "author_association": "MEMBER",
#>     "active_lock_reason": {},
#>     "body": "Currently this is the message dplyr emits for `summarize()` after `group_by()` with multiple variables.\r\n\r\n``` r\r\nlibrary(dplyr)\r\n\r\nmtcars |>\r\n  group_by(vs, am) |>\r\n  summarize(mean_mpg = mean(mpg))\r\n#> `summarise()` has grouped output by 'vs'. You can override using the `.groups`\r\n#> argument.\r\n#> # A tibble: 4 × 3\r\n#> # Groups:   vs [2]\r\n#>      vs    am mean_mpg\r\n#>   <dbl> <dbl>    <dbl>\r\n#> 1     0     0     15.0\r\n#> 2     0     1     19.8\r\n#> 3     1     0     20.7\r\n#> 4     1     1     28.4\r\n```\r\n\r\n<sup>Created on 2024-01-29 with [reprex v2.0.2](https://reprex.tidyverse.org)<\/sup>\r\n\r\nI think this message is still confusing and would be more clear if the grouping message was about the output and it explicitly stated `.groups` is an argument in `summarize()`, e.g.,\r\n\r\n```\r\nThe output is grouped by `vs`. You can specify grouping structure of the output using the `.groups` argument in `summarize()`.\r\n```\r\n\r\nIf going this route some things to keep in mind:\r\n\r\n- Maybe \"result\" instead of \"output\" in two places in the message, or change the description of the `.groups` argument to say \"Grouping structure of the output.\" Basically, we should match what we're calling the \"thing\" that the function spits out.\r\n- It would be a nice-to-have if US/UK spelling of the function in the message matched what the spelling in the code that generates the message.\r\n\r\nAn alternative suggestion by @DavisVaughan was\r\n\r\n```\r\nsummarize() has computed your expressions grouped by (foo, bar), and has regrouped the output by (foo).\r\n```\r\n\r\nI think this is an improvement over the current message too, but I'd suggest going with something simpler like the one above.\r\n",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6986/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6986/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6985",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6985/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6985/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6985/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6985",
#>     "id": 2088207009,
#>     "node_id": "I_kwDOAGIUpc58d4Kh",
#>     "number": 6985,
#>     "title": "perfromance slowdown using across within mutate",
#>     "user": {
#>       "login": "nirguk",
#>       "id": 37558320,
#>       "node_id": "MDQ6VXNlcjM3NTU4MzIw",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/37558320?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/nirguk",
#>       "html_url": "https://github.com/nirguk",
#>       "followers_url": "https://api.github.com/users/nirguk/followers",
#>       "following_url": "https://api.github.com/users/nirguk/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/nirguk/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/nirguk/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/nirguk/subscriptions",
#>       "organizations_url": "https://api.github.com/users/nirguk/orgs",
#>       "repos_url": "https://api.github.com/users/nirguk/repos",
#>       "events_url": "https://api.github.com/users/nirguk/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/nirguk/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 1,
#>     "created_at": "2024-01-18T12:40:19Z",
#>     "updated_at": "2024-01-18T16:40:44Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "I believe this is an unexplored performance issue, seemingly relating to dplyr::expand_across\r\n\r\nBenchmarked over a 1000 repetitions of processing ames data; There is a marked difference between direct mutation, and indirect mutation faciliated by across , seemingly both when using `where()` selection, and explicit all_of(c(..)) style selection. The latter speed degredation (of direct listing through all_of(c(...)) I think shows that the issue wont be related to checking properties a la the where() instant. \r\n\r\nI think the performance issue is significant, with direct mutation approx 3x faster than that mediated by across\r\n```\r\n# A tibble: 4 × 9\r\n  expression                                             min   median *`itr/sec`* mem_alloc `gc/sec` n_itr  n_gc total_time\r\n  <bch:expr>                                        <bch:tm> <bch:tm>     <dbl> <bch:byt>    <dbl> <int> <dbl>   <bch:tm>\r\n1 acrosswhere_func(ames_narrow)                       3.69ms   4.26ms      *219.*    1.75MB     7.70   966    34      4.42s\r\n2 across_all_of_func(ames_narrow)                      3.3ms   3.83ms      *256.*   64.73KB     8.20   969    31      3.78s\r\n3 direct_mutate_func(ames_narrow)                      1.1ms   1.26ms      *766.*   48.59KB     8.52   989    11      1.29s\r\n4 direct_mutate_with_class_detect_func(ames_narrow)   1.22ms   1.36ms      *722.*   71.12KB     8.77   988    12      1.37s\r\n```\r\nI came across and considered whether this was related to #6897; however I believe it is something else.\r\nHere when using across I use the anonymous function syntax as advised.\r\n\r\nfirst a reprex and then my session info...\r\n\r\n```r\r\nlibrary(bench)\r\nlibrary(tidyverse)\r\nlibrary(modeldata)\r\noptions(\"lifecycle_verbosity\"=\"error\")\r\n\r\n\r\n(ames_narrow <- ames |> select(1:5))\r\n\r\nnum_op <- mean\r\nchar_op <- identity\r\n\r\nacrosswhere_func <- function(a){\r\n  mutate(a,\r\n         across(where(is.numeric),\\(x){num_op(x)}),\r\n         across(where(is.character)|where(is.factor),\\(x){char_op(x)}))\r\n}\r\n\r\nacross_all_of_func <- function(a){\r\n  mutate(a,\r\n         across(all_of(c(\"Lot_Frontage\",\"Lot_Area\")),\\(x){num_op(x)}),\r\n         across(all_of(c(\"MS_SubClass\",\"MS_Zoning\",\"Street\")),\\(x){char_op(x)}))\r\n}\r\n\r\n\r\ndirect_mutate_func <- function(a){\r\n  mutate(a,\r\n         Lot_Frontage = num_op(Lot_Frontage),\r\n         Lot_Area = num_op(Lot_Area),\r\n         MS_SubClass =  char_op(MS_SubClass),\r\n         MS_Zoning =  char_op(MS_Zoning),\r\n         Street = char_op(Street))\r\n}\r\n\r\ndirect_mutate_with_class_detect_func <- function(a){\r\n  \r\n  l <- map_lgl(a,\\(x)is.numeric(x))\r\n  numnames <- names(l[l])\r\n  l <- map_lgl(a,\\(x){is.character(x)|is.factor(x)})\r\n  catnames <- names(l[l])\r\n  \r\n  mutate(a,\r\n         Lot_Frontage = num_op(Lot_Frontage),\r\n         Lot_Area = num_op(Lot_Area),\r\n         MS_SubClass =  char_op(MS_SubClass),\r\n         MS_Zoning =  char_op(MS_Zoning),\r\n         Street = char_op(Street))\r\n}\r\n\r\nb1 <- mark(acrosswhere_func(ames_narrow),\r\n           across_all_of_func(ames_narrow),\r\n           direct_mutate_func(ames_narrow),\r\n           direct_mutate_with_class_detect_func(ames_narrow),iterations = 1000L)\r\n\r\nselect(b1,1:9)\r\n\r\n```\r\nsession info \r\n```\r\nR version 4.2.2 (2022-10-31 ucrt)\r\nPlatform: x86_64-w64-mingw32/x64 (64-bit)\r\nRunning under: Windows 10 x64 (build 19045)\r\n\r\nMatrix products: default\r\n\r\nlocale:\r\n[1] LC_COLLATE=English_United Kingdom.utf8  LC_CTYPE=English_United Kingdom.utf8   \r\n[3] LC_MONETARY=English_United Kingdom.utf8 LC_NUMERIC=C                           \r\n[5] LC_TIME=English_United Kingdom.utf8    \r\n\r\nattached base packages:\r\n[1] stats     graphics  grDevices utils     datasets  methods   base     \r\n\r\nother attached packages:\r\n [1] modeldata_1.2.0 lubridate_1.9.3 forcats_1.0.0   stringr_1.5.1   dplyr_1.1.4     purrr_1.0.2     readr_2.1.5    \r\n [8] tidyr_1.3.0     tibble_3.2.1    ggplot2_3.4.4   tidyverse_2.0.0 bench_1.1.3    \r\n\r\nloaded via a namespace (and not attached):\r\n [1] rstudioapi_0.15.0 magrittr_2.0.3    hms_1.1.3         tidyselect_1.2.0  munsell_0.5.0     timechange_0.2.0 \r\n [7] colorspace_2.1-0  R6_2.5.1          rlang_1.1.3       fansi_1.0.4       tools_4.2.2       grid_4.2.2       \r\n[13] gtable_0.3.4      utf8_1.2.3        cli_3.6.2         withr_2.5.0       lifecycle_1.0.3   tzdb_0.4.0       \r\n[19] vctrs_0.6.5       glue_1.6.2        stringi_1.7.8     compiler_4.2.2    pillar_1.9.0      generics_0.1.3   \r\n[25] scales_1.2.1      profmem_0.6.0     pkgconfig_2.0.3 \r\n```",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6985/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6985/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6984",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6984/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6984/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6984/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6984",
#>     "id": 2081058363,
#>     "node_id": "I_kwDOAGIUpc58Cm47",
#>     "number": 6984,
#>     "title": "`cur_column()` not working in `case_when()` LHS",
#>     "user": {
#>       "login": "shirdekel",
#>       "id": 49865192,
#>       "node_id": "MDQ6VXNlcjQ5ODY1MTky",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/49865192?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/shirdekel",
#>       "html_url": "https://github.com/shirdekel",
#>       "followers_url": "https://api.github.com/users/shirdekel/followers",
#>       "following_url": "https://api.github.com/users/shirdekel/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/shirdekel/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/shirdekel/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/shirdekel/subscriptions",
#>       "organizations_url": "https://api.github.com/users/shirdekel/orgs",
#>       "repos_url": "https://api.github.com/users/shirdekel/repos",
#>       "events_url": "https://api.github.com/users/shirdekel/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/shirdekel/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 1,
#>     "created_at": "2024-01-15T00:53:29Z",
#>     "updated_at": "2024-01-19T10:01:29Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "I want to recode certain columns based on values of columns that have a similar naming. I'm using 1. `case_when()` to recode, 2. `cur_column()` to programmatically select the \"related\" columns, and 3. `across()` to automatically do this across the relevant columns.\r\n\r\nAs shown below, I can do this when specifying one column, but not with `cur_column()`. It complains that it must be used within `across()`, even though it is being used within `across()`\r\n\r\n``` r\r\nlibrary(dplyr)\r\n#> \r\n#> Attaching package: 'dplyr'\r\n#> The following objects are masked from 'package:stats':\r\n#> \r\n#>     filter, lag\r\n#> The following objects are masked from 'package:base':\r\n#> \r\n#>     intersect, setdiff, setequal, union\r\nlibrary(stringr)\r\n\r\nnames_list <-\r\n  c(\"x\", \"y\", \"color\")\r\n\r\n## works\r\n\r\nstarwars |>\r\n  rename(color = hair_color) |>\r\n  mutate(across(\r\n    skin_color,\r\n    \\(x)\r\n    case_when(\r\n      x == \"fair\" ~ x,\r\n      is.na(!!sym(na.omit(str_extract(\"skin_color\", names_list)))) ~ NA,\r\n      .default = \"other\"\r\n    )\r\n  )) |>\r\n  select(color, skin_color)\r\n#> # A tibble: 87 × 2\r\n#>    color         skin_color\r\n#>    <chr>         <chr>     \r\n#>  1 blond         fair      \r\n#>  2 <NA>          <NA>      \r\n#>  3 <NA>          <NA>      \r\n#>  4 none          other     \r\n#>  5 brown         other     \r\n#>  6 brown, grey   other     \r\n#>  7 brown         other     \r\n#>  8 <NA>          <NA>      \r\n#>  9 black         other     \r\n#> 10 auburn, white fair      \r\n#> # ℹ 77 more rows\r\n\r\n## doesn't work\r\n\r\nstarwars |>\r\n  rename(color = hair_color) |>\r\n  mutate(across(\r\n    skin_color,\r\n    \\(x)\r\n    case_when(\r\n      x == \"fair\" ~ x,\r\n      is.na(!!sym(na.omit(str_extract(cur_column(), names_list)))) ~ NA,\r\n      .default = \"other\"\r\n    )\r\n  )) |>\r\n  select(color, skin_color)\r\n#> Error in `cur_column()`:\r\n#> ! Must only be used inside `across()`.\r\n```\r\n\r\n<sup>Created on 2024-01-15 with [reprex v2.1.0](https://reprex.tidyverse.org)<\/sup>\r\n\r\n<details style=\"margin-bottom:10px;\">\r\n<summary>\r\nSession info\r\n<\/summary>\r\n\r\n``` r\r\nsessioninfo::session_info()\r\n#> ─ Session info ───────────────────────────────────────────────────────────────\r\n#>  setting  value\r\n#>  version  R version 4.3.2 (2023-10-31)\r\n#>  os       macOS Sonoma 14.2.1\r\n#>  system   aarch64, darwin23.0.0\r\n#>  ui       unknown\r\n#>  language (EN)\r\n#>  collate  en_AU.UTF-8\r\n#>  ctype    en_AU.UTF-8\r\n#>  tz       Australia/Sydney\r\n#>  date     2024-01-15\r\n#>  pandoc   2.19.2 @ /opt/homebrew/bin/ (via rmarkdown)\r\n#> \r\n#> ─ Packages ───────────────────────────────────────────────────────────────────\r\n#>  package     * version date (UTC) lib source\r\n#>  cli           3.6.2   2023-12-11 [1] CRAN (R 4.3.2)\r\n#>  digest        0.6.33  2023-07-07 [1] CRAN (R 4.3.2)\r\n#>  dplyr       * 1.1.4   2023-11-17 [1] CRAN (R 4.3.2)\r\n#>  evaluate      0.23    2023-11-01 [1] CRAN (R 4.3.2)\r\n#>  fansi         1.0.6   2023-12-08 [1] CRAN (R 4.3.2)\r\n#>  fastmap       1.1.1   2023-02-24 [1] CRAN (R 4.3.2)\r\n#>  fs            1.6.3   2023-07-20 [1] CRAN (R 4.3.2)\r\n#>  generics      0.1.3   2022-07-05 [1] CRAN (R 4.3.2)\r\n#>  glue          1.7.0   2024-01-09 [1] CRAN (R 4.3.2)\r\n#>  htmltools     0.5.7   2023-11-03 [1] CRAN (R 4.3.2)\r\n#>  knitr         1.45    2023-10-30 [1] CRAN (R 4.3.2)\r\n#>  lifecycle     1.0.4   2023-11-07 [1] CRAN (R 4.3.2)\r\n#>  magrittr      2.0.3   2022-03-30 [1] CRAN (R 4.3.2)\r\n#>  pillar        1.9.0   2023-03-22 [1] CRAN (R 4.3.2)\r\n#>  pkgconfig     2.0.3   2019-09-22 [1] CRAN (R 4.3.2)\r\n#>  purrr         1.0.2   2023-08-10 [1] CRAN (R 4.3.2)\r\n#>  R.cache       0.16.0  2022-07-21 [1] CRAN (R 4.3.2)\r\n#>  R.methodsS3   1.8.2   2022-06-13 [1] CRAN (R 4.3.2)\r\n#>  R.oo          1.25.0  2022-06-12 [1] CRAN (R 4.3.2)\r\n#>  R.utils       2.12.3  2023-11-18 [1] CRAN (R 4.3.2)\r\n#>  R6            2.5.1   2021-08-19 [1] CRAN (R 4.3.2)\r\n#>  reprex        2.1.0   2024-01-11 [1] CRAN (R 4.3.2)\r\n#>  rlang         1.1.2   2023-11-04 [1] CRAN (R 4.3.2)\r\n#>  rmarkdown     2.25    2023-09-18 [1] CRAN (R 4.3.2)\r\n#>  sessioninfo   1.2.2   2021-12-06 [1] CRAN (R 4.3.2)\r\n#>  stringi       1.8.3   2023-12-11 [1] CRAN (R 4.3.2)\r\n#>  stringr     * 1.5.1   2023-11-14 [1] CRAN (R 4.3.2)\r\n#>  styler        1.10.2  2023-08-29 [1] CRAN (R 4.3.2)\r\n#>  tibble        3.2.1   2023-03-20 [1] CRAN (R 4.3.2)\r\n#>  tidyselect    1.2.0   2022-10-10 [1] CRAN (R 4.3.2)\r\n#>  utf8          1.2.4   2023-10-22 [1] CRAN (R 4.3.2)\r\n#>  vctrs         0.6.5   2023-12-01 [1] CRAN (R 4.3.2)\r\n#>  withr         2.5.2   2023-10-30 [1] CRAN (R 4.3.2)\r\n#>  xfun          0.41    2023-11-01 [1] CRAN (R 4.3.2)\r\n#>  yaml          2.3.8   2023-12-11 [1] CRAN (R 4.3.2)\r\n#> \r\n#>  [1] /opt/homebrew/Cellar/r/4.3.2/lib/R/library\r\n#> \r\n#> ──────────────────────────────────────────────────────────────────────────────\r\n```\r\n\r\n<\/details>",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6984/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6984/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6980",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6980/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6980/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6980/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6980",
#>     "id": 2070183339,
#>     "node_id": "I_kwDOAGIUpc57ZH2r",
#>     "number": 6980,
#>     "title": "arrange not reporting syntax errors on .by_group",
#>     "user": {
#>       "login": "py9mrg",
#>       "id": 12600721,
#>       "node_id": "MDQ6VXNlcjEyNjAwNzIx",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/12600721?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/py9mrg",
#>       "html_url": "https://github.com/py9mrg",
#>       "followers_url": "https://api.github.com/users/py9mrg/followers",
#>       "following_url": "https://api.github.com/users/py9mrg/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/py9mrg/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/py9mrg/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/py9mrg/subscriptions",
#>       "organizations_url": "https://api.github.com/users/py9mrg/orgs",
#>       "repos_url": "https://api.github.com/users/py9mrg/repos",
#>       "events_url": "https://api.github.com/users/py9mrg/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/py9mrg/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 1,
#>     "created_at": "2024-01-08T10:44:14Z",
#>     "updated_at": "2024-01-08T20:52:14Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "Hello,\r\n\r\nWhen using `arrange` on grouped data (and wanting to respect the grouping), we need to use the `.by_group` argument. However, if you make a syntax error - e.g. `by_group` or `.by_groups` - then the arranging fails to respect the groups silently. This has the potential to lead to serious errors in analysis.\r\n\r\n``` r\r\nlibrary(dplyr)\r\n#> \r\n#> Attaching package: 'dplyr'\r\n#> The following objects are masked from 'package:stats':\r\n#> \r\n#>     filter, lag\r\n#> The following objects are masked from 'package:base':\r\n#> \r\n#>     intersect, setdiff, setequal, union\r\n\r\n# correct behaviour\r\nmtcars |>\r\n  group_by(cyl) |>\r\n  arrange(mpg, .by_group = TRUE)\r\n#> # A tibble: 32 × 11\r\n#> # Groups:   cyl [3]\r\n#>      mpg   cyl  disp    hp  drat    wt  qsec    vs    am  gear  carb\r\n#>    <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>\r\n#>  1  21.4     4 121     109  4.11  2.78  18.6     1     1     4     2\r\n#>  2  21.5     4 120.     97  3.7   2.46  20.0     1     0     3     1\r\n#>  3  22.8     4 108      93  3.85  2.32  18.6     1     1     4     1\r\n#>  4  22.8     4 141.     95  3.92  3.15  22.9     1     0     4     2\r\n#>  5  24.4     4 147.     62  3.69  3.19  20       1     0     4     2\r\n#>  6  26       4 120.     91  4.43  2.14  16.7     0     1     5     2\r\n#>  7  27.3     4  79      66  4.08  1.94  18.9     1     1     4     1\r\n#>  8  30.4     4  75.7    52  4.93  1.62  18.5     1     1     4     2\r\n#>  9  30.4     4  95.1   113  3.77  1.51  16.9     1     1     5     2\r\n#> 10  32.4     4  78.7    66  4.08  2.2   19.5     1     1     4     1\r\n#> # ℹ 22 more rows\r\n\r\n# syntax error leads to no grouping, but happens silently\r\nmtcars |>\r\n  group_by(cyl) |>\r\n  arrange(mpg, .by_groups = TRUE)\r\n#> # A tibble: 32 × 11\r\n#> # Groups:   cyl [3]\r\n#>      mpg   cyl  disp    hp  drat    wt  qsec    vs    am  gear  carb\r\n#>    <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>\r\n#>  1  10.4     8  472    205  2.93  5.25  18.0     0     0     3     4\r\n#>  2  10.4     8  460    215  3     5.42  17.8     0     0     3     4\r\n#>  3  13.3     8  350    245  3.73  3.84  15.4     0     0     3     4\r\n#>  4  14.3     8  360    245  3.21  3.57  15.8     0     0     3     4\r\n#>  5  14.7     8  440    230  3.23  5.34  17.4     0     0     3     4\r\n#>  6  15       8  301    335  3.54  3.57  14.6     0     1     5     8\r\n#>  7  15.2     8  276.   180  3.07  3.78  18       0     0     3     3\r\n#>  8  15.2     8  304    150  3.15  3.44  17.3     0     0     3     2\r\n#>  9  15.5     8  318    150  2.76  3.52  16.9     0     0     3     2\r\n#> 10  15.8     8  351    264  4.22  3.17  14.5     0     1     5     4\r\n#> # ℹ 22 more rows\r\n```\r\n\r\n<sup>Created on 2024-01-08 with [reprex v2.0.2](https://reprex.tidyverse.org)<\/sup>\r\n\r\nI assume this is happening because of the `...` argument combined with passing an object set to `TRUE`. I think there needs to be something here that either checks for arguments similar to `.by_group` but miss-spelt, or some other method to warn / throw an error in such circumstances. Failing to group silently seems a bit dangerous.",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6980/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6980/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6978",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6978/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6978/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6978/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6978",
#>     "id": 2058402035,
#>     "node_id": "I_kwDOAGIUpc56sLjz",
#>     "number": 6978,
#>     "title": "A better data masking indirection example in the `programming.Rmd` vignette: `filter(df, {{ var }})`",
#>     "user": {
#>       "login": "wbzyl",
#>       "id": 8049,
#>       "node_id": "MDQ6VXNlcjgwNDk=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/8049?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/wbzyl",
#>       "html_url": "https://github.com/wbzyl",
#>       "followers_url": "https://api.github.com/users/wbzyl/followers",
#>       "following_url": "https://api.github.com/users/wbzyl/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/wbzyl/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/wbzyl/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/wbzyl/subscriptions",
#>       "organizations_url": "https://api.github.com/users/wbzyl/orgs",
#>       "repos_url": "https://api.github.com/users/wbzyl/repos",
#>       "events_url": "https://api.github.com/users/wbzyl/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/wbzyl/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 0,
#>     "created_at": "2023-12-28T12:51:49Z",
#>     "updated_at": "2023-12-28T12:51:49Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "This code does not work:\r\n```r\r\nf <- function(df, var) filter(df, {{ var }})\r\nf(mtcars, am)\r\n# Error in `filter()`:\r\n# ℹ In argument: `vs`.\r\n# Caused by error:\r\n# ! `..1` must be a logical vector, not a double vector.\r\n```\r\n\r\nThis code works:\r\n```r\r\nf <- function(df, var) filter(df, {{ var }} == 0)\r\nf(mtcars, vs)\r\n```\r\n",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6978/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6978/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6973",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6973/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6973/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6973/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6973",
#>     "id": 2026732139,
#>     "node_id": "I_kwDOAGIUpc54zXpr",
#>     "number": 6973,
#>     "title": "Feature request/Question: do not drop extra classes (and attributes) with functions group_by, summarise and so",
#>     "user": {
#>       "login": "catalamarti",
#>       "id": 18575244,
#>       "node_id": "MDQ6VXNlcjE4NTc1MjQ0",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/18575244?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/catalamarti",
#>       "html_url": "https://github.com/catalamarti",
#>       "followers_url": "https://api.github.com/users/catalamarti/followers",
#>       "following_url": "https://api.github.com/users/catalamarti/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/catalamarti/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/catalamarti/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/catalamarti/subscriptions",
#>       "organizations_url": "https://api.github.com/users/catalamarti/orgs",
#>       "repos_url": "https://api.github.com/users/catalamarti/repos",
#>       "events_url": "https://api.github.com/users/catalamarti/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/catalamarti/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 1,
#>     "created_at": "2023-12-05T17:10:59Z",
#>     "updated_at": "2024-01-16T10:20:59Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "We are building some packages on top of all the dplyr + dbplyr infrastructure (very grateful for that) and we build some classes like 'generated_cohort_set', 'cdm_reference', 'cdm_table', 'codelist' and so.\r\n\r\nOne problem that we are facing is that there are some functions (group_by, summarise, ...) that drop the classes (see reprex). \r\nI guess that this is on purpose, but wondering why and if it is something that could be considered to be implemented in the future?\r\n\r\nhere are the packages if you are curious: https://cran.r-project.org/web/packages/CDMConnector/index.html, https://cran.r-project.org/web/packages/DrugUtilisation/index.html, https://cran.r-project.org/web/packages/PatientProfiles/index.html, https://cran.r-project.org/web/packages/IncidencePrevalence/index.html ...)\r\n\r\n``` r\r\nx <- dplyr::tibble(a = 1)\r\nclass(x) <- c(\"my_class\", class(x))\r\nclass(x)\r\n#> [1] \"my_class\"   \"tbl_df\"     \"tbl\"        \"data.frame\"\r\nx |> dplyr::mutate(b = 1) |> class()\r\n#> [1] \"my_class\"   \"tbl_df\"     \"tbl\"        \"data.frame\"\r\nx |> dplyr::group_by(a) |> class()\r\n#> [1] \"grouped_df\" \"tbl_df\"     \"tbl\"        \"data.frame\"\r\n```\r\n\r\n<sup>Created on 2023-12-05 with [reprex v2.0.2](https://reprex.tidyverse.org)<\/sup>\r\n\r\nFYI @edward-burn @ablack3",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6973/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6973/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6972",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6972/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6972/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6972/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6972",
#>     "id": 2019264412,
#>     "node_id": "I_kwDOAGIUpc54W4ec",
#>     "number": 6972,
#>     "title": "Feature Request: In across, have function for `.names` argument",
#>     "user": {
#>       "login": "kylebutts",
#>       "id": 19961439,
#>       "node_id": "MDQ6VXNlcjE5OTYxNDM5",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/19961439?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/kylebutts",
#>       "html_url": "https://github.com/kylebutts",
#>       "followers_url": "https://api.github.com/users/kylebutts/followers",
#>       "following_url": "https://api.github.com/users/kylebutts/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/kylebutts/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/kylebutts/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/kylebutts/subscriptions",
#>       "organizations_url": "https://api.github.com/users/kylebutts/orgs",
#>       "repos_url": "https://api.github.com/users/kylebutts/repos",
#>       "events_url": "https://api.github.com/users/kylebutts/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/kylebutts/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 2,
#>     "created_at": "2023-11-30T18:23:12Z",
#>     "updated_at": "2023-12-21T10:04:53Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "One common thing that I want to do in the `dplyr` workflow is take a set of variables, apply some function to them, and create a new set of variables. `across` makes this really easy, but it almost always requires me updating the names in a second step with `rename_with`. I'm wondering if a function would be passed to `.names` that accepts the vector of column names and returns the resulting columns names.\r\n\r\nFor example, I would want:\r\n```r\r\ndata |> \r\n  mutate(across(\r\n    matches(\"emp_[0-9]+\"),\r\n    ~ .x / emp_all, \r\n    .names = \"share_{.col}\"\r\n  )) |>\r\n  rename_with(\r\n    \\(str) gsub(\"^share_emp\", \"share_\", str)\r\n  ) \r\n```\r\nto become:\r\n```r\r\ndata |> \r\n  mutate(across(\r\n    matches(\"emp_[0-9]+\"),\r\n    ~ .x / emp_all, \r\n    .names = \\(str) gsub(\"^share_emp\", \"share_\", str)\r\n  ))\r\n```\r\n\r\nAdmittedly, I haven't thought of how that would play with other features of the function (e.g. multiple functions). Thanks for the consideration!",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6972/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6972/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6970",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6970/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6970/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6970/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6970",
#>     "id": 2007287856,
#>     "node_id": "I_kwDOAGIUpc53pMgw",
#>     "number": 6970,
#>     "title": "Feature request: allow additional predicates in join_by",
#>     "user": {
#>       "login": "cboettig",
#>       "id": 222586,
#>       "node_id": "MDQ6VXNlcjIyMjU4Ng==",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/222586?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/cboettig",
#>       "html_url": "https://github.com/cboettig",
#>       "followers_url": "https://api.github.com/users/cboettig/followers",
#>       "following_url": "https://api.github.com/users/cboettig/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/cboettig/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/cboettig/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/cboettig/subscriptions",
#>       "organizations_url": "https://api.github.com/users/cboettig/orgs",
#>       "repos_url": "https://api.github.com/users/cboettig/repos",
#>       "events_url": "https://api.github.com/users/cboettig/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/cboettig/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 2,
#>     "created_at": "2023-11-23T00:19:30Z",
#>     "updated_at": "2024-01-16T21:27:02Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "`join_by` refuses to handle any predicates it doesn't recognize:\r\n\r\n```\r\nExpressions must use one of: `==`, `>=`, `>`, `<=`, `<`, `closest()`, `between()`, `overlaps()`, or\r\n  `within()`.\r\n```  \r\n\r\nThis is understandable in a narrow sense but interferes with the ability of dplyr to work with external databases like duckdb that are far more expressive.  This is also inconsistent with most of the other dplyr functions, that are quite happy passing along such functions.  Consider manipulating the following `lazy_tbl` objects using the explicitly spatial functions that duckdb recognizes:\r\n\r\n\r\n```r\r\nlibrary(dplyr)\r\ndevtools::install_github(\"cboettig/duckdbfs@spatial-read\")\r\nlibrary(duckdbfs)\r\n\r\ncountries <- open_dataset(\"/vsicurl/https://github.com/cboettig/duckdbfs/raw/spatial-read/inst/extdata/world.gpkg\",\r\n                          format = \"sf\", tblname = \"countries\")\r\n\r\ncities <- open_dataset(\"/vsicurl/https://github.com/cboettig/duckdbfs/raw/spatial-read/inst/extdata/metro.fgb\",\r\n                          format = \"sf\", tblname = \"cities\")\r\n\r\nmelbourne <- st_point(c(144.9633, -37.814)) |> st_as_text()\r\n\r\n# most dplyr functions have no difficulty using these arguments\r\n\r\ncountries |> filter(st_contains(geom, ST_GeomFromText({melbourne})))\r\n```\r\n\r\nnote that `dplyr::filter` (and most other such functions) have no problem passing these `st_*` functions on to duckdb, allowing us to do spatial operations.  Now a very natural operation is to do spatial joins, e.g. in SQL / DBI we can do:\r\n\r\n```\r\ncon <- cached_connection() # duckdbfs connection that holds the above tables\r\n\r\nx <- DBI::dbGetQuery(con,\"\r\nSELECT countries.iso_a3, cities.geom, countries.geom AS geometry\r\nFROM countries\r\nLEFT JOIN cities\r\nON st_contains(countries.geom, cities.geom)\r\n\") |> as_tibble()\r\n```\r\n\r\nAll I'd like is for dplyr to construct this syntax with it's usual wonderful magic, e.g. I want to write:\r\n\r\n```r\r\ncountries |> left_join(cities, join_by(st_contains(geom, geom))) \r\n```\r\n \r\nWouldn't that be nice?  I think it could do so if only `join_by()` was not so fastidious in asserting that it doesn't understand anything but a hard-coded set of functions.   Unfortunately this obviously errors with the message:\r\n\r\n```\r\nError in `join_by()`:\r\n! Expressions must use one of: `==`, `>=`, `>`, `<=`, `<`, `closest()`, `between()`, `overlaps()`, or\r\n  `within()`.\r\nℹ Expression 1 is `st_contains(geom, geom)`.\r\n```\r\n\r\nWould it be possible to just relax this assertion, e.g. when the dataset in question is a remote src?\r\n\r\n\r\n\r\n\r\n",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6970/reactions",
#>       "total_count": 1,
#>       "+1": 1,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6970/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6968",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6968/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6968/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6968/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6968",
#>     "id": 2002723133,
#>     "node_id": "I_kwDOAGIUpc53XyE9",
#>     "number": 6968,
#>     "title": "Emphasize that filter(x, A, B) is not strictly the same as filter(filter(x, A), B)",
#>     "user": {
#>       "login": "MichaelChirico",
#>       "id": 7606389,
#>       "node_id": "MDQ6VXNlcjc2MDYzODk=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/7606389?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/MichaelChirico",
#>       "html_url": "https://github.com/MichaelChirico",
#>       "followers_url": "https://api.github.com/users/MichaelChirico/followers",
#>       "following_url": "https://api.github.com/users/MichaelChirico/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/MichaelChirico/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/MichaelChirico/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/MichaelChirico/subscriptions",
#>       "organizations_url": "https://api.github.com/users/MichaelChirico/orgs",
#>       "repos_url": "https://api.github.com/users/MichaelChirico/repos",
#>       "events_url": "https://api.github.com/users/MichaelChirico/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/MichaelChirico/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [
#>       {
#>         "id": 674867158,
#>         "node_id": "MDU6TGFiZWw2NzQ4NjcxNTg=",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/documentation",
#>         "name": "documentation",
#>         "color": "CBBAB8",
#>         "default": true,
#>         "description": ""
#>       }
#>     ],
#>     "state": "open",
#>     "locked": true,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 4,
#>     "created_at": "2023-11-20T17:58:51Z",
#>     "updated_at": "2023-11-22T11:36:09Z",
#>     "closed_at": {},
#>     "author_association": "CONTRIBUTOR",
#>     "active_lock_reason": "too heated",
#>     "body": "Have had to re-confirm this for myself a few times:\r\n\r\n```r\r\nfilter(mtcars, cyl < max(cyl), hp < max(hp)) |> dim()\r\n# [1] 18 11\r\n\r\n# vs\r\nfilter(filter(mtcars, cyl < max(cyl)), hp < max(hp)) |> dim()\r\n# [1] 17 11\r\n```\r\n\r\nThis in `?dplyr` hints at what's going on:\r\n\r\n> If multiple expressions are included, they are combined with the `&` operator.\r\n\r\nBut this behavior is a bit more subtle / worth calling out IMO. This came up again recently here:\r\n\r\nhttps://github.com/r-lib/lintr/pull/2305#discussion_r1398186673\r\n\r\nFWIW it's also really not clear from reading the `filter.data.frame` implementation without being well-versed in {dplyr} internals.",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6968/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6968/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6962",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6962/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6962/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6962/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6962",
#>     "id": 1986012646,
#>     "node_id": "I_kwDOAGIUpc52YCXm",
#>     "number": 6962,
#>     "title": "Feature request: Pipe-supportive pass-through of unrecoded elements using `case_match()`?",
#>     "user": {
#>       "login": "jmobrien",
#>       "id": 7095842,
#>       "node_id": "MDQ6VXNlcjcwOTU4NDI=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/7095842?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/jmobrien",
#>       "html_url": "https://github.com/jmobrien",
#>       "followers_url": "https://api.github.com/users/jmobrien/followers",
#>       "following_url": "https://api.github.com/users/jmobrien/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/jmobrien/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/jmobrien/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/jmobrien/subscriptions",
#>       "organizations_url": "https://api.github.com/users/jmobrien/orgs",
#>       "repos_url": "https://api.github.com/users/jmobrien/repos",
#>       "events_url": "https://api.github.com/users/jmobrien/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/jmobrien/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 0,
#>     "created_at": "2023-11-09T16:39:56Z",
#>     "updated_at": "2023-11-09T16:42:41Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "`case_match()` is great to have as a more pipe-able alternative to `case_when()` following modern tidyverse approaches.  However, it lacks an equivalent capabilities to one nice feature of its predecessor `recode()`: namely, where non-recoded elements could be allowed to pass through into the output.  While there is a workaround for this missing feature provided in the help examples, I'm realizing it may not generalize well across use cases.\r\n\r\nAn example similar to what I encountered:\r\n\r\n``` r\r\n# Some filenames:\r\nfilenames <- \r\n  c(\"juniors_2022_OU.csv\", \"roster_2023_juniors_notre_dame.csv\",  \"2022_SOU_juniors_roster.csv\")\r\n\r\n# Begin building tibble to (eventually) import & organize the content from these files:\r\ntibble::tibble(\r\n\r\n  # Import filenames (in practice, would be a call to list.files() ):\r\n  file_names = filenames,\r\n  \r\n  # Get key info like year and school out of filenames: \r\n  \r\n  # Year is straightforward:\r\n  id_year = file_names |> stringr::str_extract(\"202[23]\"),\r\n  \r\n  #School, however, needs initialisms expanded to minimize ambiguity:\r\n  \r\n  # recode() can do this inside a single set of piped instructions. It\r\n  # fills in the original data when items are not recoded (& same \r\n  # type as recoded output):\r\n\r\n  id_school_recode = \r\n    file_names |> \r\n    # Remove non-school-name content:\r\n      stringr::str_remove(\".csv$\") |> \r\n      stringr::str_remove(\"_?202[23]_?\") |> \r\n      stringr::str_remove(\"_?juniors_?\") |> \r\n      stringr::str_remove(\"_?roster_?\") |>\r\n    # Recode initialisms:\r\n      dplyr::recode(\r\n        \"OU\" = \"oklahoma\",\r\n        \"SOU\" = \"southern_oregon\"\r\n      ),\r\n  \r\n  # Using case_match(), though, non-recoded elements become NA.\r\n  id_school_casematch = \r\n    file_names |> \r\n      stringr::str_remove(\".csv$\") |> \r\n      stringr::str_remove(\"_?202[23]_?\") |> \r\n      stringr::str_remove(\"_?juniors_?\") |> \r\n      stringr::str_remove(\"_?roster_?\") |> \r\n      dplyr::case_match(\r\n        \"OU\" ~ \"oklahoma\",\r\n        \"SOU\" ~ \"southern_oregon\"\r\n      )\r\n)\r\n#> # A tibble: 3 × 4\r\n#>   file_names                        id_year id_school_recode id_school_casematch\r\n#>   <chr>                             <chr>   <chr>            <chr>              \r\n#> 1 juniors_2022_OU.csv               2022    oklahoma         oklahoma           \r\n#> 2 roster_2023_juniors_notre_dame.c… 2023    notre_dame       <NA>               \r\n#> 3 2022_SOU_juniors_roster.csv       2022    southern_oregon  southern_oregon\r\n \r\n```     \r\n\r\nHelp docs for case_match() has an example that uses argument `.default = <<varname>>` (e.g. species) to fill back in original data.  This would work in `mutate()`, but not here in `tibble()` - using the approach requires multiple arguments specifying the same column/variable, which tibble() forbids:\r\n\r\n``` r\r\ntibble::tibble(\r\n\r\n  # Locate and remove non-name content:\r\n  id_school_casematch = \r\n    filenames |> \r\n    stringr::str_remove(\".csv$\") |> \r\n    stringr::str_remove(\"_?202[23]_?\") |> \r\n    stringr::str_remove(\"_?juniors_?\") |> \r\n    stringr::str_remove(\"_?roster_?\"),\r\n\r\n  # Recode names:\r\n  id_school_casematch = \r\n    id_school_casematch |> \r\n    dplyr::case_match(\r\n      \"OU\" ~ \"oklahoma\",\r\n      \"SOU\" ~ \"southern_oregon\",\r\n      .default = id_school_casematch\r\n    )\r\n)\r\n#> Error in `tibble::tibble()`:\r\n#> ! Column name `id_school_casematch` must not be duplicated.\r\n#> Use `.name_repair` to specify repair.\r\n#> Caused by error in `repaired_names()`:\r\n#> ! Names must be unique.\r\n#> ✖ These names are duplicated:\r\n#>   * \"id_school_casematch\" at locations 1 and 2.\r\n```\r\n\r\n(also, even when using mutate or standard variable creation [<-], specifying any *new* column/variable requires 2 separate arguments/calls.  Admittedly my personal opinion, but that does seems less concise/readable to me, and/or not fully capitalizing on the pipe-ability that seems to be `case_match()`'s key offering.)\r\n\r\nCould `case_match()` perhaps have an option/default added, e.g. `case_match(.x, ..., .default = .x)`,  that would mirror `recode()`'s capabilities?  I recognize you'd still need equivalents to `recode()`'s checks ensuring that new & pass-through content have the same type--but wouldn't that be manageable, given  the `vctrs` underpinnings of this function? \r\n",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6962/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6962/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6958",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6958/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6958/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6958/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6958",
#>     "id": 1983450532,
#>     "node_id": "I_kwDOAGIUpc52OQ2k",
#>     "number": 6958,
#>     "title": "Feature Request: Intuitive DataFrame Transposition Functionality in dplyr",
#>     "user": {
#>       "login": "hsalberti",
#>       "id": 76076260,
#>       "node_id": "MDQ6VXNlcjc2MDc2MjYw",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/76076260?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/hsalberti",
#>       "html_url": "https://github.com/hsalberti",
#>       "followers_url": "https://api.github.com/users/hsalberti/followers",
#>       "following_url": "https://api.github.com/users/hsalberti/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/hsalberti/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/hsalberti/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/hsalberti/subscriptions",
#>       "organizations_url": "https://api.github.com/users/hsalberti/orgs",
#>       "repos_url": "https://api.github.com/users/hsalberti/repos",
#>       "events_url": "https://api.github.com/users/hsalberti/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/hsalberti/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 1,
#>     "created_at": "2023-11-08T12:07:38Z",
#>     "updated_at": "2023-11-11T12:21:32Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "Brief description of the problem:\r\n\r\nTransposing a DataFrame in dplyr currently requires a combination of pivot_longer() and pivot_wider() functions. This process is not as straightforward as using the base R t() function and can be confusing for users, especially those new to dplyr or coming from a base R background. An intuitive, one-step transposition function would greatly simplify the data manipulation process in dplyr.\r\n\r\nExpected output:\r\n\r\nA new function, possibly named transpose_df(), that allows users to transpose a DataFrame in a single step, mirroring the simplicity and ease of use of the base R t() function.\r\n\r\n----------------------------------------------------------------------------------------\r\nlibrary(dplyr)\r\nlibrary(tidyr)\r\n\r\n# Sample dataframe\r\ndf <- tibble::tibble(\r\n  x = 1:3,\r\n  y = 4:6,\r\n  z = 7:9\r\n)\r\n\r\n# Current method for transposing in dplyr/tidyr\r\ntransposed_df <- df %>%\r\n  pivot_longer(cols = everything(), names_to = \"variable\", values_to = \"value\") %>%\r\n  pivot_wider(names_from = \"variable\", values_from = \"value\")\r\n\r\n# Print the transposed dataframe\r\nprint(transposed_df)\r\n",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6958/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6958/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6952",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6952/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6952/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6952/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6952",
#>     "id": 1976871896,
#>     "node_id": "I_kwDOAGIUpc511KvY",
#>     "number": 6952,
#>     "title": "`lifecycle::last_lifecycle_warnings()` seems incompatible with dplyr warning handler",
#>     "user": {
#>       "login": "DavisVaughan",
#>       "id": 19150088,
#>       "node_id": "MDQ6VXNlcjE5MTUwMDg4",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/19150088?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/DavisVaughan",
#>       "html_url": "https://github.com/DavisVaughan",
#>       "followers_url": "https://api.github.com/users/DavisVaughan/followers",
#>       "following_url": "https://api.github.com/users/DavisVaughan/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/DavisVaughan/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/DavisVaughan/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/DavisVaughan/subscriptions",
#>       "organizations_url": "https://api.github.com/users/DavisVaughan/orgs",
#>       "repos_url": "https://api.github.com/users/DavisVaughan/repos",
#>       "events_url": "https://api.github.com/users/DavisVaughan/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/DavisVaughan/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [
#>       {
#>         "id": 17708198,
#>         "node_id": "MDU6TGFiZWwxNzcwODE5OA==",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/bug",
#>         "name": "bug",
#>         "color": "E0B3A2",
#>         "default": true,
#>         "description": "an unexpected problem or unintended behavior"
#>       }
#>     ],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 0,
#>     "created_at": "2023-11-03T20:15:05Z",
#>     "updated_at": "2023-11-03T20:15:11Z",
#>     "closed_at": {},
#>     "author_association": "MEMBER",
#>     "active_lock_reason": {},
#>     "body": "i.e. it tells you to run the lifecycle function, but there is no warning there:\r\n\r\n``` r\r\nlibrary(dplyr, warn.conflicts = FALSE)\r\nrlang::local_interactive()\r\n\r\ndf <- tibble(x = 1)\r\n\r\nmutate(df, across(x, mean, na.rm = TRUE))\r\n#> Warning: There was 1 warning in `mutate()`.\r\n#> ℹ In argument: `across(x, mean, na.rm = TRUE)`.\r\n#> Caused by warning:\r\n#> ! The `...` argument of `across()` is deprecated as of dplyr 1.1.0.\r\n#> Supply arguments directly to `.fns` through an anonymous function instead.\r\n#> \r\n#>   # Previously\r\n#>   across(a:b, mean, na.rm = TRUE)\r\n#> \r\n#>   # Now\r\n#>   across(a:b, \\(x) mean(x, na.rm = TRUE))\r\n#> This warning is displayed once every 8 hours.\r\n#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was\r\n#> generated.\r\n#> # A tibble: 1 × 1\r\n#>       x\r\n#>   <dbl>\r\n#> 1     1\r\n\r\nlifecycle::last_lifecycle_warnings()\r\n#> list()\r\n\r\ndplyr::last_dplyr_warnings()\r\n#> [[1]]\r\n#> <warning/rlang_warning>\r\n#> Warning in `mutate()`:\r\n#> ℹ In argument: `across(x, mean, na.rm = TRUE)`.\r\n#> Caused by warning:\r\n#> ! The `...` argument of `across()` is deprecated as of dplyr 1.1.0.\r\n#> Supply arguments directly to `.fns` through an anonymous function instead.\r\n#> \r\n#>   # Previously\r\n#>   across(a:b, mean, na.rm = TRUE)\r\n#> \r\n#>   # Now\r\n#>   across(a:b, \\(x) mean(x, na.rm = TRUE))\r\n#> This warning is displayed once every 8 hours.\r\n#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was\r\n#> generated.\r\n#> ---\r\n#> Backtrace:\r\n#>     ▆\r\n#>  1. ├─dplyr::mutate(df, across(x, mean, na.rm = TRUE))\r\n#>  2. ├─dplyr:::mutate.data.frame(df, across(x, mean, na.rm = TRUE)) at dplyr/R/mutate.R:146:3\r\n#>  3. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by) at dplyr/R/mutate.R:181:3\r\n#>  4. │   ├─base::withCallingHandlers(...) at dplyr/R/mutate.R:268:3\r\n#>  5. │   └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns) at dplyr/R/mutate.R:273:7\r\n#>  6. │     └─mask$eval_all_mutate(quo) at dplyr/R/mutate.R:380:9\r\n#>  7. │       └─dplyr (local) eval() at dplyr/R/data-mask.R:94:7\r\n#>  8. └─dplyr::across(x, mean, na.rm = TRUE)\r\n```\r\n\r\n<sup>Created on 2023-11-03 with [reprex v2.0.2](https://reprex.tidyverse.org)<\/sup>",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6952/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6952/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6943",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6943/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6943/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6943/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6943",
#>     "id": 1961317705,
#>     "node_id": "I_kwDOAGIUpc5051VJ",
#>     "number": 6943,
#>     "title": "condition handling ignores locally set options",
#>     "user": {
#>       "login": "moodymudskipper",
#>       "id": 18351714,
#>       "node_id": "MDQ6VXNlcjE4MzUxNzE0",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/18351714?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/moodymudskipper",
#>       "html_url": "https://github.com/moodymudskipper",
#>       "followers_url": "https://api.github.com/users/moodymudskipper/followers",
#>       "following_url": "https://api.github.com/users/moodymudskipper/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/moodymudskipper/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/moodymudskipper/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/moodymudskipper/subscriptions",
#>       "organizations_url": "https://api.github.com/users/moodymudskipper/orgs",
#>       "repos_url": "https://api.github.com/users/moodymudskipper/repos",
#>       "events_url": "https://api.github.com/users/moodymudskipper/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/moodymudskipper/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [
#>       {
#>         "id": 17708198,
#>         "node_id": "MDU6TGFiZWwxNzcwODE5OA==",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/bug",
#>         "name": "bug",
#>         "color": "E0B3A2",
#>         "default": true,
#>         "description": "an unexpected problem or unintended behavior"
#>       }
#>     ],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 1,
#>     "created_at": "2023-10-25T12:33:55Z",
#>     "updated_at": "2024-03-27T17:00:27Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "Maybe because of a delayed evaluation issue ?\r\n\r\n``` r\r\nbugged <- function() {\r\n  withr::local_options(warn = 2)\r\n  rlang::warn(\"oops\") # or warning(\"oops\")\r\n  24\r\n}\r\n\r\n# as expected\r\n\r\nbugged()\r\n#> Error: (converted from warning) oops\r\nsubset(cars, speed == bugged())\r\n#> Error: (converted from warning) oops\r\n\r\n# unexpected\r\n\r\ndplyr::filter(cars, speed == bugged())\r\n#> Warning: There was 1 warning in `dplyr::filter()`.\r\n#> ℹ In argument: `speed == bugged()`.\r\n#> Caused by warning:\r\n#> ! oops\r\n#>   speed dist\r\n#> 1    24   70\r\n#> 2    24   92\r\n#> 3    24   93\r\n#> 4    24  120\r\n```\r\n\r\n<sup>Created on 2023-10-25 with [reprex v2.0.2](https://reprex.tidyverse.org)<\/sup>\r\n",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6943/reactions",
#>       "total_count": 1,
#>       "+1": 1,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6943/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6942",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6942/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6942/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6942/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/pull/6942",
#>     "id": 1951021595,
#>     "node_id": "PR_kwDOAGIUpc5dNZSf",
#>     "number": 6942,
#>     "title": "Uptaded documentation on rows_append and rows_insert, issue #6864",
#>     "user": {
#>       "login": "hsalberti",
#>       "id": 76076260,
#>       "node_id": "MDQ6VXNlcjc2MDc2MjYw",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/76076260?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/hsalberti",
#>       "html_url": "https://github.com/hsalberti",
#>       "followers_url": "https://api.github.com/users/hsalberti/followers",
#>       "following_url": "https://api.github.com/users/hsalberti/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/hsalberti/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/hsalberti/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/hsalberti/subscriptions",
#>       "organizations_url": "https://api.github.com/users/hsalberti/orgs",
#>       "repos_url": "https://api.github.com/users/hsalberti/repos",
#>       "events_url": "https://api.github.com/users/hsalberti/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/hsalberti/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 0,
#>     "created_at": "2023-10-19T01:34:19Z",
#>     "updated_at": "2023-10-19T01:34:19Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "draft": false,
#>     "pull_request": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/pulls/6942",
#>       "html_url": "https://github.com/tidyverse/dplyr/pull/6942",
#>       "diff_url": "https://github.com/tidyverse/dplyr/pull/6942.diff",
#>       "patch_url": "https://github.com/tidyverse/dplyr/pull/6942.patch",
#>       "merged_at": {}
#>     },
#>     "body": "https://github.com/tidyverse/dplyr/issues/6864\r\nSolved this issue! Looking forward for a response",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6942/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6942/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6939",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6939/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6939/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6939/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6939",
#>     "id": 1935721054,
#>     "node_id": "I_kwDOAGIUpc5zYMJe",
#>     "number": 6939,
#>     "title": "`Error in vapply(.x, .f, .mold, ..., USE.NAMES = FALSE)`: cli_warn together with dplyr grouping results in error.",
#>     "user": {
#>       "login": "lschneiderbauer",
#>       "id": 422100,
#>       "node_id": "MDQ6VXNlcjQyMjEwMA==",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/422100?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/lschneiderbauer",
#>       "html_url": "https://github.com/lschneiderbauer",
#>       "followers_url": "https://api.github.com/users/lschneiderbauer/followers",
#>       "following_url": "https://api.github.com/users/lschneiderbauer/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/lschneiderbauer/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/lschneiderbauer/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/lschneiderbauer/subscriptions",
#>       "organizations_url": "https://api.github.com/users/lschneiderbauer/orgs",
#>       "repos_url": "https://api.github.com/users/lschneiderbauer/repos",
#>       "events_url": "https://api.github.com/users/lschneiderbauer/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/lschneiderbauer/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [
#>       {
#>         "id": 17708198,
#>         "node_id": "MDU6TGFiZWwxNzcwODE5OA==",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/bug",
#>         "name": "bug",
#>         "color": "E0B3A2",
#>         "default": true,
#>         "description": "an unexpected problem or unintended behavior"
#>       }
#>     ],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 1,
#>     "created_at": "2023-10-10T16:09:09Z",
#>     "updated_at": "2023-11-06T15:22:08Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "Hi,\r\n\r\nit took me a while to get to this (very artificial) reduced example, but I managed to get it: For some reason, using `cli::warn()` inside a nested and grouped mutate function results in the described error.\r\n\r\nRemoving `cli_warn()` also removes the error and results in a sane answer.\r\n\r\nI am using R 4.2.1, with dplyr 1.1.3 and cli 3.6.1.\r\n\r\n---\r\n\r\nBrief description of the problem\r\n\r\n``` r\r\nlibrary(cli)\r\nlibrary(dplyr)\r\n#> \r\n#> Attache Paket: 'dplyr'\r\n#> Die folgenden Objekte sind maskiert von 'package:stats':\r\n#> \r\n#>     filter, lag\r\n#> Die folgenden Objekte sind maskiert von 'package:base':\r\n#> \r\n#>     intersect, setdiff, setequal, union\r\n\r\nsome_warning <- function() {\r\n  cli::cli_warn(\"some warning\")\r\n  return(1)\r\n}\r\n\r\ncreate_new_col <- function() {\r\n  tibble(col = TRUE) |>\r\n    mutate(\r\n      new_col = some_warning(),\r\n      .by = col\r\n    ) |>\r\n    pull(new_col)\r\n}\r\n\r\ntibble(group = TRUE) |>\r\n  mutate(new_col = create_new_col(), .by = group)\r\n#> Error in vapply(.x, .f, .mold, ..., USE.NAMES = FALSE): Werte müssen die Länge 1 haben,\r\n#> Ergebnis von FUN(X[[1]]) hat aber Länge 0\r\n```\r\n\r\n<sup>Created on 2023-10-10 with [reprex v2.0.2](https://reprex.tidyverse.org)<\/sup>\r\n\r\n",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6939/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6939/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6934",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6934/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6934/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6934/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6934",
#>     "id": 1922262606,
#>     "node_id": "I_kwDOAGIUpc5yk2ZO",
#>     "number": 6934,
#>     "title": "When `.unpack = TRUE`, `.names` should delay its column name uniqueness check",
#>     "user": {
#>       "login": "DavisVaughan",
#>       "id": 19150088,
#>       "node_id": "MDQ6VXNlcjE5MTUwMDg4",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/19150088?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/DavisVaughan",
#>       "html_url": "https://github.com/DavisVaughan",
#>       "followers_url": "https://api.github.com/users/DavisVaughan/followers",
#>       "following_url": "https://api.github.com/users/DavisVaughan/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/DavisVaughan/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/DavisVaughan/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/DavisVaughan/subscriptions",
#>       "organizations_url": "https://api.github.com/users/DavisVaughan/orgs",
#>       "repos_url": "https://api.github.com/users/DavisVaughan/repos",
#>       "events_url": "https://api.github.com/users/DavisVaughan/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/DavisVaughan/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [
#>       {
#>         "id": 17708200,
#>         "node_id": "MDU6TGFiZWwxNzcwODIwMA==",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/feature",
#>         "name": "feature",
#>         "color": "B4C3AE",
#>         "default": false,
#>         "description": "a feature request or enhancement"
#>       },
#>       {
#>         "id": 3407329987,
#>         "node_id": "LA_kwDOAGIUpc7LF7rD",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/columns%20%E2%86%94%EF%B8%8F",
#>         "name": "columns ↔️",
#>         "color": "eeeeee",
#>         "default": false,
#>         "description": "Operations on columns: mutate(), select(),  rename(), relocate()"
#>       }
#>     ],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 0,
#>     "created_at": "2023-10-02T16:38:23Z",
#>     "updated_at": "2023-10-02T16:38:23Z",
#>     "closed_at": {},
#>     "author_association": "MEMBER",
#>     "active_lock_reason": {},
#>     "body": "Extracted from https://github.com/tidyverse/dplyr/issues/6933\r\n\r\nSometimes the function you apply in `across()` returns a tibble who's column names already uniquely identify that function (`TTR::TDI()` or `TTR::MACD()`), so you don't need to name the `list()` as that would be repetitive, and you don't need the `_1` or `_2` you get automatically.\r\n\r\nIt would be nice if you could set `.names = \"{.col}_\"` when `.unpack = TRUE` to handle this special case, but that runs the name uniqueness check too early. It creates two names called `var1_`, which do eventually get resolved _after_ the unpacking is done, and a second name uniqueness check is already done in `df_unpack()`, so I think we can skip the ones in `across_setup()` when `.unpack = TRUE`.\r\n\r\nEasiest way to do this is the probably give `across_setup()` a `name_repair` argument that we can set to `\"minimal\"` when `.unpack = TRUE`.\r\n\r\n``` r\r\nlibrary(dplyr, warn.conflicts = FALSE)\r\n\r\ndf <- tibble(\r\n  var1 = seq(1, 100, 1)\r\n)\r\n\r\nmetric_a <- function(x) {\r\n  tibble::tibble(a = x, a_info = x + 1)\r\n}\r\nmetric_b <- function(x) {\r\n  tibble::tibble(b = x, b_info = x + 1)\r\n}\r\n\r\n# dont need 1 and 2 here\r\ndf |>\r\n  mutate(across(\r\n    var1,\r\n    list(\r\n      \\(.x) metric_a(.x),\r\n      \\(.x) metric_b(.x)\r\n    ),\r\n    .unpack = TRUE\r\n  ))\r\n#> # A tibble: 100 × 5\r\n#>     var1 var1_1_a var1_1_a_info var1_2_b var1_2_b_info\r\n#>    <dbl>    <dbl>         <dbl>    <dbl>         <dbl>\r\n#>  1     1        1             2        1             2\r\n#>  2     2        2             3        2             3\r\n#>  3     3        3             4        3             4\r\n#>  4     4        4             5        4             5\r\n#>  5     5        5             6        5             6\r\n#>  6     6        6             7        6             7\r\n#>  7     7        7             8        7             8\r\n#>  8     8        8             9        8             9\r\n#>  9     9        9            10        9            10\r\n#> 10    10       10            11       10            11\r\n#> # ℹ 90 more rows\r\n\r\n# this is also repetitive\r\ndf |>\r\n  mutate(across(\r\n    var1,\r\n    list(\r\n      a = \\(.x) metric_a(.x),\r\n      b = \\(.x) metric_b(.x)\r\n    ),\r\n    .unpack = TRUE\r\n  ))\r\n#> # A tibble: 100 × 5\r\n#>     var1 var1_a_a var1_a_a_info var1_b_b var1_b_b_info\r\n#>    <dbl>    <dbl>         <dbl>    <dbl>         <dbl>\r\n#>  1     1        1             2        1             2\r\n#>  2     2        2             3        2             3\r\n#>  3     3        3             4        3             4\r\n#>  4     4        4             5        4             5\r\n#>  5     5        5             6        5             6\r\n#>  6     6        6             7        6             7\r\n#>  7     7        7             8        7             8\r\n#>  8     8        8             9        8             9\r\n#>  9     9        9            10        9            10\r\n#> 10    10       10            11       10            11\r\n#> # ℹ 90 more rows\r\n\r\n# ideally:\r\ndf |>\r\n  mutate(across(\r\n    var1,\r\n    list(\r\n      a = \\(.x) metric_a(.x),\r\n      b = \\(.x) metric_b(.x)\r\n    ),\r\n    .names = \"{.col}_\",\r\n    .unpack = TRUE\r\n  ))\r\n#> Error in `mutate()`:\r\n#> ℹ In argument: `across(...)`.\r\n#> Caused by error in `across()`:\r\n#> ! Names must be unique.\r\n#> ✖ These names are duplicated:\r\n#>   * \"var1_\" at locations 1 and 2.\r\n#> Backtrace:\r\n#>      ▆\r\n#>   1. ├─dplyr::mutate(...)\r\n#>   2. ├─dplyr:::mutate.data.frame(...)\r\n#>   3. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)\r\n#>   4. │   ├─base::withCallingHandlers(...)\r\n#>   5. │   └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)\r\n#>   6. │     └─mask$eval_all_mutate(quo)\r\n#>   7. │       └─dplyr (local) eval()\r\n#>   8. └─dplyr::across(...)\r\n#>   9.   └─dplyr:::across_setup(...)\r\n#>  10.     └─vctrs::vec_as_names(...)\r\n#>  11.       └─vctrs (local) `<fn>`()\r\n#>  12.         └─vctrs:::validate_unique(names = names, arg = arg, call = call)\r\n#>  13.           └─vctrs:::stop_names_must_be_unique(names, arg, call = call)\r\n#>  14.             └─vctrs:::stop_names(...)\r\n#>  15.               └─vctrs:::stop_vctrs(...)\r\n#>  16.                 └─rlang::abort(message, class = c(class, \"vctrs_error\"), ..., call = call)\r\n```\r\n\r\n<sup>Created on 2023-10-02 with [reprex v2.0.2](https://reprex.tidyverse.org)<\/sup>",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6934/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6934/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6921",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6921/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6921/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6921/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6921",
#>     "id": 1874567994,
#>     "node_id": "I_kwDOAGIUpc5vu6M6",
#>     "number": 6921,
#>     "title": "bug in `dplyr::near`?",
#>     "user": {
#>       "login": "kaz462",
#>       "id": 47867131,
#>       "node_id": "MDQ6VXNlcjQ3ODY3MTMx",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/47867131?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/kaz462",
#>       "html_url": "https://github.com/kaz462",
#>       "followers_url": "https://api.github.com/users/kaz462/followers",
#>       "following_url": "https://api.github.com/users/kaz462/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/kaz462/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/kaz462/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/kaz462/subscriptions",
#>       "organizations_url": "https://api.github.com/users/kaz462/orgs",
#>       "repos_url": "https://api.github.com/users/kaz462/repos",
#>       "events_url": "https://api.github.com/users/kaz462/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/kaz462/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [
#>       {
#>         "id": 674867158,
#>         "node_id": "MDU6TGFiZWw2NzQ4NjcxNTg=",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/documentation",
#>         "name": "documentation",
#>         "color": "CBBAB8",
#>         "default": true,
#>         "description": ""
#>       }
#>     ],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 6,
#>     "created_at": "2023-08-31T00:49:25Z",
#>     "updated_at": "2023-11-06T14:48:33Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "Is the following example a bug in `near`?\r\n```r\r\n> near(1.1 * 100 * 10^200, 110 * 10^200)\r\n[1] FALSE\r\n```\r\n_Originally posted by @bundfussr in https://github.com/pharmaverse/admiral/issues/2060#issuecomment-1691876301_\r\n\r\nThe same example works as expected with `base::all.equal()`\r\n```r\r\n> all.equal(1.1 * 100 * 10^200, 110 * 10^200)\r\n[1] TRUE\r\n```       ",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6921/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6921/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6915",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6915/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6915/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6915/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6915",
#>     "id": 1858206506,
#>     "node_id": "I_kwDOAGIUpc5uwfsq",
#>     "number": 6915,
#>     "title": "FR: `rows_clean()`?",
#>     "user": {
#>       "login": "krlmlr",
#>       "id": 1741643,
#>       "node_id": "MDQ6VXNlcjE3NDE2NDM=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/1741643?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/krlmlr",
#>       "html_url": "https://github.com/krlmlr",
#>       "followers_url": "https://api.github.com/users/krlmlr/followers",
#>       "following_url": "https://api.github.com/users/krlmlr/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/krlmlr/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/krlmlr/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/krlmlr/subscriptions",
#>       "organizations_url": "https://api.github.com/users/krlmlr/orgs",
#>       "repos_url": "https://api.github.com/users/krlmlr/repos",
#>       "events_url": "https://api.github.com/users/krlmlr/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/krlmlr/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [
#>       {
#>         "id": 17708200,
#>         "node_id": "MDU6TGFiZWwxNzcwODIwMA==",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/feature",
#>         "name": "feature",
#>         "color": "B4C3AE",
#>         "default": false,
#>         "description": "a feature request or enhancement"
#>       },
#>       {
#>         "id": 3407327207,
#>         "node_id": "LA_kwDOAGIUpc7LF6_n",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/rows%20%E2%86%95%EF%B8%8F",
#>         "name": "rows ↕️",
#>         "color": "eeeeee",
#>         "default": false,
#>         "description": "Operations on rows: filter(), slice(), arrange()"
#>       }
#>     ],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 0,
#>     "created_at": "2023-08-20T17:27:26Z",
#>     "updated_at": "2023-11-06T14:47:31Z",
#>     "closed_at": {},
#>     "author_association": "MEMBER",
#>     "active_lock_reason": {},
#>     "body": "Do we want to add a function that clears all rows to the `rows_*()` family? For data frames, this is `df[0, ]`, but this will be useful for databases and `in_place = TRUE` .\r\n\r\nDownstream: https://github.com/cynkra/dm/issues/851.",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6915/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6915/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6909",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6909/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6909/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6909/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/pull/6909",
#>     "id": 1847851427,
#>     "node_id": "PR_kwDOAGIUpc5XyB0w",
#>     "number": 6909,
#>     "title": "Materialize results in collect()",
#>     "user": {
#>       "login": "krlmlr",
#>       "id": 1741643,
#>       "node_id": "MDQ6VXNlcjE3NDE2NDM=",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/1741643?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/krlmlr",
#>       "html_url": "https://github.com/krlmlr",
#>       "followers_url": "https://api.github.com/users/krlmlr/followers",
#>       "following_url": "https://api.github.com/users/krlmlr/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/krlmlr/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/krlmlr/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/krlmlr/subscriptions",
#>       "organizations_url": "https://api.github.com/users/krlmlr/orgs",
#>       "repos_url": "https://api.github.com/users/krlmlr/repos",
#>       "events_url": "https://api.github.com/users/krlmlr/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/krlmlr/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 2,
#>     "created_at": "2023-08-12T08:16:34Z",
#>     "updated_at": "2023-08-24T03:06:56Z",
#>     "closed_at": {},
#>     "author_association": "MEMBER",
#>     "active_lock_reason": {},
#>     "draft": false,
#>     "pull_request": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/pulls/6909",
#>       "html_url": "https://github.com/tidyverse/dplyr/pull/6909",
#>       "diff_url": "https://github.com/tidyverse/dplyr/pull/6909.diff",
#>       "patch_url": "https://github.com/tidyverse/dplyr/pull/6909.patch",
#>       "merged_at": {}
#>     },
#>     "body": "for duckplyr.",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6909/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6909/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6906",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6906/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6906/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6906/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6906",
#>     "id": 1839401013,
#>     "node_id": "I_kwDOAGIUpc5towg1",
#>     "number": 6906,
#>     "title": "Add a `ptype` argument to `between()` since we can't make it cast to the type of `x` at this time",
#>     "user": {
#>       "login": "Generalized",
#>       "id": 60151643,
#>       "node_id": "MDQ6VXNlcjYwMTUxNjQz",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/60151643?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/Generalized",
#>       "html_url": "https://github.com/Generalized",
#>       "followers_url": "https://api.github.com/users/Generalized/followers",
#>       "following_url": "https://api.github.com/users/Generalized/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/Generalized/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/Generalized/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/Generalized/subscriptions",
#>       "organizations_url": "https://api.github.com/users/Generalized/orgs",
#>       "repos_url": "https://api.github.com/users/Generalized/repos",
#>       "events_url": "https://api.github.com/users/Generalized/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/Generalized/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [
#>       {
#>         "id": 17708200,
#>         "node_id": "MDU6TGFiZWwxNzcwODIwMA==",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/feature",
#>         "name": "feature",
#>         "color": "B4C3AE",
#>         "default": false,
#>         "description": "a feature request or enhancement"
#>       },
#>       {
#>         "id": 544019342,
#>         "node_id": "MDU6TGFiZWw1NDQwMTkzNDI=",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/vctrs%20%E2%86%97%EF%B8%8F",
#>         "name": "vctrs ↗️",
#>         "color": "eeeeee",
#>         "default": false,
#>         "description": ""
#>       }
#>     ],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 4,
#>     "created_at": "2023-08-07T12:55:59Z",
#>     "updated_at": "2023-11-06T14:08:46Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "The result of using `between()` in filtering is not equivalent to evaluating a conditional expression when working with ordered factors.\r\n\r\n```{r}\r\n> (x <- data.frame(Visit = c(\"Discharge\", \"Month 3\", \"Month 6\", \"Month 12\", \"Month 20\")))\r\n      Visit\r\n1 Discharge\r\n2   Month 3\r\n3   Month 6\r\n4  Month 12\r\n5  Month 20\r\n\r\n> class(x$Visit)\r\n[1] \"character\"\r\n```\r\n\r\nNow let's make it an ordered factor with assumed levels (used later for other operations):\r\n```{r}\r\n> (x$Visit <- factor(x$Visit, levels = c(\"Baseline\", \"Discharge\", \"Month 3\", \"Month 6\", \"Month 12\", \"Month 20\", \"Premature\"), ordered = TRUE))\r\n[1] Discharge Month 3   Month 6   Month 12  Month 20 \r\nLevels: Baseline < Discharge < Month 3 < Month 6 < Month 12 < Month 20 < Premature\r\n```\r\n\r\nWhen filtering using the conjunction of conditions it works\r\n```{r}\r\n> x %>% filter(Visit >= \"Discharge\" & Visit <= \"Month 20\")\r\n      Visit\r\n1 Discharge\r\n2   Month 3\r\n3   Month 6\r\n4  Month 12\r\n5  Month 20\r\n```\r\nWhen using the convenient between(), it doesn't\r\n```{r}\r\n> x %>% filter(between(Visit, \"Discharge\", \"Month 20\"))\r\n      Visit\r\n1 Discharge\r\n2  Month 12\r\n3  Month 20\r\n```\r\n2 items are missing in the output.\r\n\r\n-----\r\nR version 4.2.0 (2022-04-22 ucrt)\r\nPlatform: x86_64-w64-mingw32/x64 (64-bit)\r\nRunning under: Windows 10 x64 (build 19045)\r\n\r\n> packageVersion(\"dplyr\")\r\n[1] ‘1.1.1’",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6906/reactions",
#>       "total_count": 0,
#>       "+1": 0,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6906/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   },
#>   {
#>     "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6905",
#>     "repository_url": "https://api.github.com/repos/tidyverse/dplyr",
#>     "labels_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6905/labels{/name}",
#>     "comments_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6905/comments",
#>     "events_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6905/events",
#>     "html_url": "https://github.com/tidyverse/dplyr/issues/6905",
#>     "id": 1839123639,
#>     "node_id": "I_kwDOAGIUpc5tnsy3",
#>     "number": 6905,
#>     "title": "`bind_rows()` for database tables",
#>     "user": {
#>       "login": "mgirlich",
#>       "id": 18258854,
#>       "node_id": "MDQ6VXNlcjE4MjU4ODU0",
#>       "avatar_url": "https://avatars.githubusercontent.com/u/18258854?v=4",
#>       "gravatar_id": "",
#>       "url": "https://api.github.com/users/mgirlich",
#>       "html_url": "https://github.com/mgirlich",
#>       "followers_url": "https://api.github.com/users/mgirlich/followers",
#>       "following_url": "https://api.github.com/users/mgirlich/following{/other_user}",
#>       "gists_url": "https://api.github.com/users/mgirlich/gists{/gist_id}",
#>       "starred_url": "https://api.github.com/users/mgirlich/starred{/owner}{/repo}",
#>       "subscriptions_url": "https://api.github.com/users/mgirlich/subscriptions",
#>       "organizations_url": "https://api.github.com/users/mgirlich/orgs",
#>       "repos_url": "https://api.github.com/users/mgirlich/repos",
#>       "events_url": "https://api.github.com/users/mgirlich/events{/privacy}",
#>       "received_events_url": "https://api.github.com/users/mgirlich/received_events",
#>       "type": "User",
#>       "site_admin": false
#>     },
#>     "labels": [
#>       {
#>         "id": 17708200,
#>         "node_id": "MDU6TGFiZWwxNzcwODIwMA==",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/feature",
#>         "name": "feature",
#>         "color": "B4C3AE",
#>         "default": false,
#>         "description": "a feature request or enhancement"
#>       },
#>       {
#>         "id": 3407327207,
#>         "node_id": "LA_kwDOAGIUpc7LF6_n",
#>         "url": "https://api.github.com/repos/tidyverse/dplyr/labels/rows%20%E2%86%95%EF%B8%8F",
#>         "name": "rows ↕️",
#>         "color": "eeeeee",
#>         "default": false,
#>         "description": "Operations on rows: filter(), slice(), arrange()"
#>       }
#>     ],
#>     "state": "open",
#>     "locked": false,
#>     "assignee": {},
#>     "assignees": [],
#>     "milestone": {},
#>     "comments": 1,
#>     "created_at": "2023-08-07T10:06:08Z",
#>     "updated_at": "2023-11-06T14:38:30Z",
#>     "closed_at": {},
#>     "author_association": "NONE",
#>     "active_lock_reason": {},
#>     "body": "It would be nice if `bind_rows()` would work for database tables.\r\n\r\n``` r\r\nlibrary(dplyr, warn.conflicts = FALSE)\r\nlibrary(purrr)\r\ncon <- DBI::dbConnect(RSQLite::SQLite(), \":memory:\")\r\n\r\n# Create random slices of mtcars\r\ntables <-\r\n  1:5 |>\r\n  map(function(n) {\r\n    tbl_name <- paste0(\"mtcars_\", n)\r\n    copy_to(con, slice_sample(mtcars, n = 3), tbl_name)\r\n\r\n    tbl(con, tbl_name)\r\n  })\r\nbind_rows(!!!tables)\r\n#> Error in `bind_rows()`:\r\n#> ! Argument 1 must be a data frame or a named atomic vector.\r\n#> Backtrace:\r\n#>     ▆\r\n#>  1. └─dplyr::bind_rows(!!!tables)\r\n#>  2.   └─rlang::abort(glue(\"Argument {i} must be a data frame or a named atomic vector.\"))\r\n```\r\n\r\n<sup>Created on 2023-08-07 with [reprex v2.0.2](https://reprex.tidyverse.org)<\/sup>\r\n\r\nI know there were issues with the double dispatch and what happens if local tables and database tables are mixed.\r\nBut I think it would be sufficient if either all inputs are local tables or database tables.\r\nThis was also requested again in dbplyr: https://github.com/tidyverse/dbplyr/issues/1342.",
#>     "reactions": {
#>       "url": "https://api.github.com/repos/tidyverse/dplyr/issues/6905/reactions",
#>       "total_count": 7,
#>       "+1": 7,
#>       "-1": 0,
#>       "laugh": 0,
#>       "hooray": 0,
#>       "confused": 0,
#>       "heart": 0,
#>       "rocket": 0,
#>       "eyes": 0
#>     },
#>     "timeline_url": "https://api.github.com/repos/tidyverse/dplyr/issues/6905/timeline",
#>     "performed_via_github_app": {},
#>     "state_reason": {}
#>   }
#> ] 

## Automatic pagination
users <- gh("/users", .limit = 50)
length(users)
#> [1] 50
if (FALSE) {
## Access developer preview of Licenses API (in preview as of 2015-09-24)
gh("/licenses") # used to error code 415
gh("/licenses", .accept = "application/vnd.github.drax-preview+json")
}
if (FALSE) {
## Access Github Enterprise API
## Use GITHUB_API_URL environment variable to change the default.
gh("/user/repos", type = "public", .api_url = "https://github.foobar.edu/api/v3")
}
if (FALSE) {
## Use I() to force body part to be sent as an array, even if length 1
## This works whether assignees has length 1 or > 1
assignees <- "gh_user"
assignees <- c("gh_user1", "gh_user2")
gh("PATCH /repos/OWNER/REPO/issues/1", assignees = I(assignees))
}
if (FALSE) {
## There are two ways to send JSON data. One is that you supply one or
## more objects that will be converted to JSON automatically via
## jsonlite::toJSON(). In this case sometimes you need to use
## jsonlite::unbox() because fromJSON() creates lists from scalar vectors
## by default. The Content-Type header is automatically added in this
## case. For example this request turns on GitHub Pages, using this
## API: https://docs.github.com/v3/repos/pages/#enable-a-pages-site

gh::gh(
  "POST /repos/{owner}/{repo}/pages",
  owner = "r-lib",
  repo = "gh",
  source = list(
    branch = jsonlite::unbox("gh-pages"),
    path = jsonlite::unbox("/")
  ),
  .send_headers = c(Accept = "application/vnd.github.switcheroo-preview+json")
)

## The second way is to handle the JSON encoding manually, and supply it
## as a raw vector in an unnamed argument, and also a Content-Type header:

body <- '{ "source": { "branch": "gh-pages", "path": "/" } }'
gh::gh(
  "POST /repos/{owner}/{repo}/pages",
  owner = "r-lib",
  repo = "gh",
  charToRaw(body),
  .send_headers = c(
    Accept = "application/vnd.github.switcheroo-preview+json",
    "Content-Type" = "application/json"
  )
)
}
if (FALSE) {
## Pass along a query to the search/code endpoint via the ... argument
x <- gh::gh(
            "/search/code",
            q = "installation repo:r-lib/gh",
            .send_headers = c("X-GitHub-Api-Version" = "2022-11-28")
            )
 str(x, list.len = 3, give.attr = FALSE)

}