{"id":14068636,"url":"https://github.com/romainfrancois/splice","last_synced_at":"2025-04-13T00:42:23.386Z","repository":{"id":66313490,"uuid":"168340937","full_name":"romainfrancois/splice","owner":"romainfrancois","description":"splice helpers for dplyr","archived":false,"fork":false,"pushed_at":"2023-06-28T13:42:40.000Z","size":7,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-13T00:42:17.479Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/romainfrancois.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-30T12:41:04.000Z","updated_at":"2025-02-06T15:59:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"6efbc496-2738-465e-b8b1-e71058213548","html_url":"https://github.com/romainfrancois/splice","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romainfrancois%2Fsplice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romainfrancois%2Fsplice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romainfrancois%2Fsplice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romainfrancois%2Fsplice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romainfrancois","download_url":"https://codeload.github.com/romainfrancois/splice/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650417,"owners_count":21139672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-13T07:06:19.071Z","updated_at":"2025-04-13T00:42:23.361Z","avatar_url":"https://github.com/romainfrancois.png","language":"R","readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n# splice\n\n\u003c!-- badges: start --\u003e\n[![Travis build status](https://travis-ci.org/romainfrancois/splice.svg?branch=master)](https://travis-ci.org/romainfrancois/splice)\n\u003c!-- badges: end --\u003e\n\n`splice` is an experimental package that brings some capabilities of \n`dplyr::summarise_(all,if,at)` to `dplyr::summarise()` directly. \n\n## Installation\n\nYou can install from github:\n\n``` r\n# install.packages(\"remotes\")\ndevtools::install_github(\"romainfrancois/splice\")\n```\n\n## Example\n\nThe motivating example was \"how do I get the mean of all variables AND the number of observations\". \n\nThere are many ways to get just that information, but I wanted to use `dplyr::summarise_all()`\nwhich would get me the means, but not the number of observations. \n\n`summarise(!!!all_(...))` is the same as `summarise_all(...)` but having `!!!all_()` inside\n`summarise()` lets you add other things as well: \n\n```{r example}\nlibrary(dplyr, warn.conflicts = FALSE)\nlibrary(splice)\n\niris %\u003e% \n  group_by(Species) %\u003e% \n  summarise(n = n(), !!!all_(mean))\n```\n\nSimilarly, `if_()` and `at_()`: \n\n```{r}\niris %\u003e%\n  summarise(n = n(), !!!if_(is.numeric, mean))\n\niris %\u003e%\n  summarise(n = n(), !!!at_(vars(starts_with(\"Sepal\")), mean))\n```\n\n","funding_links":[],"categories":["R"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromainfrancois%2Fsplice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromainfrancois%2Fsplice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromainfrancois%2Fsplice/lists"}