{"id":17855449,"url":"https://github.com/nrennie/messy","last_synced_at":"2025-04-13T02:20:49.973Z","repository":{"id":252674915,"uuid":"685562521","full_name":"nrennie/messy","owner":"nrennie","description":"R package to make a data frame messy and untidy.","archived":false,"fork":false,"pushed_at":"2024-12-03T23:03:54.000Z","size":1683,"stargazers_count":141,"open_issues_count":5,"forks_count":9,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-04T04:12:04.429Z","etag":null,"topics":["r","r-package","teaching"],"latest_commit_sha":null,"homepage":"https://nrennie.rbind.io/messy/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nrennie.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2023-08-31T14:05:16.000Z","updated_at":"2025-04-01T05:38:21.000Z","dependencies_parsed_at":"2024-08-11T18:33:40.468Z","dependency_job_id":"a292a092-4230-41c3-a865-f63871f38318","html_url":"https://github.com/nrennie/messy","commit_stats":null,"previous_names":["nrennie/messy"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrennie%2Fmessy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrennie%2Fmessy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrennie%2Fmessy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nrennie%2Fmessy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nrennie","download_url":"https://codeload.github.com/nrennie/messy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248654647,"owners_count":21140335,"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":["r","r-package","teaching"],"created_at":"2024-10-28T02:23:00.554Z","updated_at":"2025-04-13T02:20:49.947Z","avatar_url":"https://github.com/nrennie.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- badges: start --\u003e\n  [![R-CMD-check](https://github.com/nrennie/messy/workflows/R-CMD-check/badge.svg)](https://github.com/nrennie/messy/actions)\n  [![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/messy)](https://cran.r-project.org/package=messy)\n\u003c!-- badges: end --\u003e\n\n# messy \u003cimg src=\"man/figures/logo.png\" align=\"right\" width=\"120\" /\u003e\n\nWhen teaching examples using R, instructors often using *nice* datasets - but these aren't very realistic, and aren't what students will later encounter in the real world. Real datasets have typos, missing values encoded in strange ways, and weird spaces. The {messy} R package takes a *clean* dataset, and randomly adds these things in - giving students the opportunity to practice their data cleaning and wrangling skills without having to change all of your examples.\n\n## Installation\n\nInstall from CRAN using:\n\n```r\ninstall.packages(\"messy\")\n```\n\nInstall development version from GitHub using:\n\n```r\nremotes::install_github(\"nrennie/messy\")\n```\n\n## Usage\n\nFor more in-depth usage instructions, see the package documentation at [nrennie.rbind.io/messy](https://nrennie.rbind.io/messy/) which has examples of each function.\n\nThe simplest way to use the {messy} package is applying the `messy()` function:\n\n```r\nset.seed(1234)\nmessy(ToothGrowth[1:10,])\n```\n\n```r\n    len supp dose\n1   4.2   VC  0.5\n2  11.5 \u003cNA\u003e \u003cNA\u003e\n3  7.3    VC  0.5\n4   5.8  (VC  0.5\n5   6.4   VC \u003cNA\u003e\n6    10   VC  0.5\n7  11.2 \u003cNA\u003e  0.5\n8  11.2   VC  0.5\n9  5.2    VC  0.5\n10    7   VC 0.5 \n```\n\nYou can vary the amount of *messiness* for each function, and chain together different functions to create customised messy data:\n\n```r\nset.seed(1234)\nToothGrowth[1:10,] |\u003e \n  make_missing(cols = \"supp\", missing = \" \") |\u003e \n  make_missing(cols = c(\"len\", \"dose\"), missing = c(NA, 999)) |\u003e \n  add_whitespace(cols = \"supp\", messiness = 0.5) |\u003e \n  add_special_chars(cols = \"supp\")\n```\n\n```r\n    len supp dose\n1   4.2   VC  0.5\n2  11.5  VC    NA\n3   7.3   VC  0.5\n4   5.8 *VC   0.5\n5   6.4  VC   0.5\n6  10.0   VC  0.5\n7  11.2       0.5\n8  11.2  V#C   NA\n9   5.2  !VC  0.5\n10  7.0 VC*   0.5\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnrennie%2Fmessy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnrennie%2Fmessy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnrennie%2Fmessy/lists"}