{"id":14068895,"url":"https://github.com/mkearney/tfse","last_synced_at":"2025-04-12T10:51:01.650Z","repository":{"id":42215369,"uuid":"62493045","full_name":"mkearney/tfse","owner":"mkearney","description":"🛠 Useful R functions for various things","archived":false,"fork":false,"pushed_at":"2019-07-04T16:31:50.000Z","size":8526,"stargazers_count":18,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T05:41:52.051Z","etag":null,"topics":["data-science","functions","mkearney-r-package","r-language","rstats","utility"],"latest_commit_sha":null,"homepage":"https://tfse.mikewk.com","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/mkearney.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}},"created_at":"2016-07-03T11:10:44.000Z","updated_at":"2023-08-21T17:20:09.000Z","dependencies_parsed_at":"2022-07-10T16:31:07.068Z","dependency_job_id":null,"html_url":"https://github.com/mkearney/tfse","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkearney%2Ftfse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkearney%2Ftfse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkearney%2Ftfse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkearney%2Ftfse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkearney","download_url":"https://codeload.github.com/mkearney/tfse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248557844,"owners_count":21124165,"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":["data-science","functions","mkearney-r-package","r-language","rstats","utility"],"created_at":"2024-08-13T07:06:28.196Z","updated_at":"2025-04-12T10:51:01.629Z","avatar_url":"https://github.com/mkearney.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"---\noutput: github_document\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(collapse = TRUE, comment = \"#\u003e\")\nset.seed(1234)\n## load pkg\nlibrary(tfse)\n```\n\n# tfse \u003cimg src=\"man/figures/logo.png\" width=\"160px\" align=\"right\" /\u003e \n\n[![Travis build status](https://travis-ci.org/mkearney/tfse.svg?branch=master)](https://travis-ci.org/mkearney/tfse)\n[![Coverage status](https://codecov.io/gh/mkearney/tfse/branch/master/graph/badge.svg)](https://codecov.io/github/mkearney/tfse?branch=master)\n\n[![lifecycle](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)\n\nVarious useful functions for working with data and writing functions\n\n## Install\n\nInstall from CRAN\n\n```{r, eval=FALSE}\n## from CRAN repo\ninstall.packages(\"tfse\")\n```\n\n\nInstall dev version from Github\n\n```{r, eval=FALSE}\n## from github\nremotes::install_github(\"mkearney/tfse\")\n```\n\n## Usage\n\n### Scales\n\nRescale to standard (0-1) scale\n\n```{r}\n## 0-1 scale\nrescale_standard(-2:2)\n```\n\nRescale to normal (mean = 0; sd = 1) scale\n\n```{r}\n## z scores\nrescale_normal(-2:2)\n```\n\nRescale to arbitrary lower/upper bounds\n\n```{r}\n## specify new scale bounds\nrescale_pointscale(-2:2, 1, 10)\n```\n\n### Citations\n\nPrint out the APA-formatted citation for R packages.\n\n```{r}\n## print out APA citation for {rtweet}\napa_citation(\"rtweet\")\n```\n\n### Annotate script files\n\nUse `box_code()` to add a header-like chunk to your clipboard–paste in script as desired.\n\n```{r}\n## store text in clipboard\nbox_code(\"EXAMPLE #1\")\n\n## the pasted output:\n##----------------------------------------------------------------------------##\n##                                 EXAMPLE #1                                 ##\n##----------------------------------------------------------------------------##\n```\n\n\n### Regular expressions\n\nGet all regular expression matches (using easier looka-heads/look-behinds)\n\n```{r}\n## some text\nx \u003c- c(\"This *is* a test\", \n  \"#this *was* a test\", \n  \"This *will* be a test!\",\n  \"This *has been* a test; it *is* great.\")\n\n## return text between asterisks, return as atomic vector\nregmatches_(x, \"(?\u003c=\\\\*)\\\\S[^*]+(?=\\\\*)\", drop = TRUE)\n```\n\n### Github\n\nFigure out the name of a Github repo for a given package\n\n```{r}\n## repo name of devtools\ndesc_gh_repo(\"devtools\")\n```\n\nConvert a Github link to the raw URL version\n\n```{r}\n## path to raw version of Github file\ngithub_raw(\"https://github.com/mkearney/driven-snow/blob/master/theme/driven-snow.rstheme\")\n```\n\n\n\n## Help\n\nView the help documentation\n\n```{r, eval=FALSE}\n## view R help documentatoin\nhelp(package = \"tfse\")\n```\n\n## about tfse\n- This is my personal R package of utility functions\n- Why *tfse*? The acronym was creatively reconfigured from its\n  originally intended state\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkearney%2Ftfse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkearney%2Ftfse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkearney%2Ftfse/lists"}