{"id":14068647,"url":"https://github.com/dgrtwo/snippr","last_synced_at":"2025-03-17T16:30:55.560Z","repository":{"id":30398288,"uuid":"33951039","full_name":"dgrtwo/snippr","owner":"dgrtwo","description":"Manage, share, and install RStudio code snippets","archived":false,"fork":false,"pushed_at":"2018-03-20T12:43:15.000Z","size":136,"stargazers_count":80,"open_issues_count":3,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-16T12:42:36.812Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dgrtwo.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-14T19:01:00.000Z","updated_at":"2025-03-05T06:40:24.000Z","dependencies_parsed_at":"2022-09-08T05:04:45.601Z","dependency_job_id":null,"html_url":"https://github.com/dgrtwo/snippr","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/dgrtwo%2Fsnippr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgrtwo%2Fsnippr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgrtwo%2Fsnippr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgrtwo%2Fsnippr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dgrtwo","download_url":"https://codeload.github.com/dgrtwo/snippr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244068760,"owners_count":20392888,"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.470Z","updated_at":"2025-03-17T16:30:55.267Z","avatar_url":"https://github.com/dgrtwo.png","language":"R","readme":"---\noutput:\n  md_document:\n    variant: markdown_github\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"README-\"\n)\n```\n\nsnippr: publish, install, and share RStudio code snippets\n------------------------------------------\n\nsnippr provides tools to manage and install [RStudio code snippets](http://blog.rstudio.org/2015/04/13/rstudio-v0-99-preview-code-snippets/), including installing them from public repositories.\n\n### Setup\n\nYou can install `snippr` with the [devtools](https://github.com/hadley/devtools) package:\n\n```{r eval = FALSE}\ndevtools::install_github(\"dgrtwo/snippr\")\n```\n\n### Sharing and installing snippets\n\nsnippr lets you share RStudio snippets with others by publishing them as a [GitHub repository](https://github.com/) or a [Gist](https://gist.github.com/).\n\nTo share your snippets, create a GitHub repository with one or more `.snippets` file at the top level: see the [dgrtwo/snippets](https://github.com/dgrtwo/snippets) repository for an example. Anyone can then install your snippets using the code:\n\n```{r eval = FALSE}\nlibrary(snippr)\nsnippets_install_github(\"dgrtwo/snippets\")\n```\n\nNote that you may need to restart RStudio for the snippets to load. If you want to install only for one of the languages in the repo, you can use the `language` argument:\n\n```{r eval = FALSE}\nsnippets_install_github(\"dgrtwo/snippets\", language = \"r\")\n```\n\nOr you can choose to install only a single snippet:\n\n```{r eval = FALSE}\nsnippets_install_github(\"dgrtwo/snippets\", language = \"r\", name = \"S3\")\n```\n\nIf you prefer, you can share one .snippets file as a GitHub Gist (like [this one](https://gist.github.com/dgrtwo/ecc6aec8d37af42cdd83)), and install it with its ID:\n\n```{r eval = FALSE}\nsnippets_install_gist(\"ecc6aec8d37af42cdd83\", language = \"r\")\n```\n\nSee the vignettes for more.\n","funding_links":[],"categories":["R"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgrtwo%2Fsnippr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdgrtwo%2Fsnippr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgrtwo%2Fsnippr/lists"}