{"id":16274447,"url":"https://github.com/njlyon0/supportr","last_synced_at":"2025-03-20T00:32:17.967Z","repository":{"id":45466204,"uuid":"468469728","full_name":"njlyon0/supportR","owner":"njlyon0","description":"Support Functions for Wrangling and Visualization","archived":false,"fork":false,"pushed_at":"2024-08-23T15:34:23.000Z","size":6665,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-23T19:47:30.133Z","etag":null,"topics":["data-science","r-package"],"latest_commit_sha":null,"homepage":"https://njlyon0.github.io/supportR/","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/njlyon0.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","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":"2022-03-10T18:43:55.000Z","updated_at":"2024-09-10T19:55:55.000Z","dependencies_parsed_at":"2023-01-20T16:31:14.039Z","dependency_job_id":"548dd8c2-db20-4617-bfbc-b2ae53df75cd","html_url":"https://github.com/njlyon0/supportR","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njlyon0%2FsupportR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njlyon0%2FsupportR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njlyon0%2FsupportR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/njlyon0%2FsupportR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/njlyon0","download_url":"https://codeload.github.com/njlyon0/supportR/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219866006,"owners_count":16555917,"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","r-package"],"created_at":"2024-10-10T18:28:52.748Z","updated_at":"2025-03-20T00:32:17.954Z","avatar_url":"https://github.com/njlyon0.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n\u003cimg src = \"man/figures/supportR_hex.png\" align = \"right\" width = \"15%\"/\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(collapse = TRUE, comment = \"#\u003e\", fig.path = \"man/figures/README-\")\n```\n\n# `supportR` - Support Functions for Wrangling and Visualization\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/njlyon0/supportR/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/njlyon0/supportR/actions/workflows/R-CMD-check.yaml)\n[![](https://cranlogs.r-pkg.org/badges/supportR)](https://cran.r-project.org/package=supportR)\n![GitHub issues](https://img.shields.io/github/issues-raw/njlyon0/supportR)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/njlyon0/supportR)\n\u003c!-- badges: end --\u003e\n\n`supportR` is an R package where the only unifying theme of the functions is honestly just that I wrote them. That said, there are some useful functions for **data wrangling** and **plotting** in particular, though functions for *other purposes* are also included. I'll add functions to this package as I write more orphan scripts that I hope others might find useful so stay tuned!\n\n## Installation\n\nYou can install the development version from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"njlyon0/supportR\")\n```\n\n### Data Wrangling\n\n- **`summary_table`**: Calculates summary values (mean, standard deviation, sample size, and standard error) of a given response variable within supplied groups\n\n- **`safe_rename`**: Renames columns in a given dataframe by matching 'bad' names with 'good' names\n\n- **`name_vec`**: Creates a named vector of specified contents and names. Useful when creating named vectors that are too long to create manually or when creating the vector and then naming it is cumbersome\n\n- **`crop_tri`**: Removes the specified \"triangle\" (either upper or lower) of a symmetric data object by replacing with NAs. Also allows user to specify whether to keep or also drop the diagonal\n\n- **`array_melt`**: \"Flattens\" an array of dimensions X, Y, and Z into a dataframe containing columns `x`, `y`, `z`, and `value` where `value` is whatever was stored in the array at those coordinates\n\n### Quality Control (QC)\n\n- **`diff_check`**: Compares two vectors and identifies what elements are found in the first but not the second (i.e., *lost* components) and what elements are found in the second but not the first (i.e., *gained* components). Extremely useful prior to `join`ing two dataframes to compare index column contents or to ensure no columns are unexpectedly lost during complex wrangling operations\n\n- **`num_check`**: Checks column(s) that _should_ contain only **numeric** values for any entries that would be coerced to NA if `as.numeric` is run\n\n- **`count`**: Counts instances of each unique element in a provided vector \n\n- **`replace_non_ascii`**: Replaces non-ASCII characters with visually comparable ASCII equivalents\n\n- **`date_check`**: Checks column(s) that _should_ contain only **date** values for any entries that would be coerced to NA if `as.Date` is run\n\n- **`date_format_guess`**: Checks a column containing multiple ambiguous date formats and identifies its best guess for the format each date is in (e.g., 'dd/mm/yyyy' versus 'yyyy/dd/mm', etc.)\n\n### Visualization \u0026 Graphics\n\n- **`theme_lyon`**: Applies a set of modifications to the non-data aspects of a `ggplot2` plot to ensure a consistent \"feel\" of a set of plots\n\n- **`ordination`**: Creates an ordination for either the nonmetric multidimensional scaling (NMS) dissimilarity matrix created by `vegan::metaMDS` or for the principal coordinates analysis (PCoA) distance matrix returned by `ape::pcoa`\n\n### Operations Outside of R\n\n- **`github_ls`**: Lists contents of a GitHub repository from its URL and returns a simple dataframe containing the name, type, and file path of identified objects. Supports recursive listing (i.e., listing of contents of subfolders identified in first list of contents)\n\n- **`github_tree`**: Creates a file tree diagram of a GitHub repository from its URL\n\n- **`tabularize_md`**: Converts a markdown file into a table that retains the nested structure of any headings in the file. Accepts either the file name/path locally or a URL connection to a markdown file hosted online (e.g., a GitHub repository README.md, etc.)\n\n- **`rmd_export`**: Allows knitting of a specified R Markdown file locally and simultaneously to a specified Google Drive folder. **NOTE:** you must authorize R to work with Google Drive by using `googldrive::drive_auth()` for this function to work\n\n## Looking Ahead\n\nMore functions are likely to be developed and housed within this package so stay tuned! Feel free to post ideas for new functions as [an issue](https://github.com/njlyon0/supportR/issues) on this repository and I'll do my best to build them!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnjlyon0%2Fsupportr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnjlyon0%2Fsupportr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnjlyon0%2Fsupportr/lists"}