{"id":13707494,"url":"https://github.com/dbosak01/fmtr","last_synced_at":"2025-10-22T06:17:04.940Z","repository":{"id":43726751,"uuid":"275608068","full_name":"dbosak01/fmtr","owner":"dbosak01","description":"An R package for formatting data.","archived":false,"fork":false,"pushed_at":"2025-01-28T03:32:17.000Z","size":3133,"stargazers_count":12,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T16:16:30.009Z","etag":null,"topics":["fmtr","format","formats","formatting","r"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/dbosak01.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":".github/FUNDING.yml","license":null,"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},"funding":{"github":["dbosak01"]}},"created_at":"2020-06-28T14:59:48.000Z","updated_at":"2025-01-28T03:32:21.000Z","dependencies_parsed_at":"2023-11-10T14:36:42.022Z","dependency_job_id":"5d47728d-31cb-4b6d-8960-776d42229ea1","html_url":"https://github.com/dbosak01/fmtr","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbosak01%2Ffmtr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbosak01%2Ffmtr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbosak01%2Ffmtr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbosak01%2Ffmtr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbosak01","download_url":"https://codeload.github.com/dbosak01/fmtr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252616482,"owners_count":21776986,"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":["fmtr","format","formats","formatting","r"],"created_at":"2024-08-02T22:01:33.225Z","updated_at":"2025-10-22T06:17:04.934Z","avatar_url":"https://github.com/dbosak01.png","language":"HTML","funding_links":["https://github.com/sponsors/dbosak01"],"categories":["HTML"],"sub_categories":[],"readme":"\u003c!-- badges: start --\u003e\n\n[![fmtr version](https://www.r-pkg.org/badges/version/fmtr)](https://cran.r-project.org/package=fmtr)\n[![fmtr lifecycle](https://img.shields.io/badge/lifecycle-stable-blue.svg)](https://cran.r-project.org/package=fmtr)\n[![fmtr downloads](https://cranlogs.r-pkg.org/badges/fmtr)](https://cran.r-project.org/package=fmtr)\n[![fmtr total downloads](https://cranlogs.r-pkg.org/badges/grand-total/fmtr)](https://cran.r-project.org/package=fmtr)\n[![R-CMD-check](https://github.com/dbosak01/fmtr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/dbosak01/fmtr/actions/workflows/R-CMD-check.yaml)\n[![Codecov test coverage](https://codecov.io/gh/dbosak01/fmtr/branch/master/graph/badge.svg)](https://app.codecov.io/gh/dbosak01/fmtr?branch=master)\n\n\u003c!-- badges: end --\u003e\n\n# Introduction to **fmtr**\n\u003cimg src=\"man/images/fmtr_new.png\" align=\"left\" height=\"138px\" style=\"height:138px;margin-right:10px\"/\u003e\n\nR has a variety of ways to format data. There are functions for \nformatting dates, several functions to format numbers, plus you can always \ndo a lookup with a named vector, or write your own vectorized function.  Yet\nthere are several problems with the way R handles formatting.\n\nOne problem is that there are *too many* formatting functions.  It is not\neasy to remember which functions do what, and the differences between them.\nOne goal of the **fmtr** package is to consolidate R's formatting capabilities \ninto a smaller number of functions.\n\nAnother problem is when you want to *reuse* a format. While there are many ways\nto format data, there is no mechanism to save a format and reuse it later. \nTherefore, another goal of the **fmtr** package is to promote format reuse. \n\nA third problem is when you have a complex format that can only be \naccomplished with multiple formatting functions.  It would be nice to \nhave a way to keep these multiple formats together, and assign them\nall at once.\n\nFinally, there are some formatting activities that are so common, it seems \nlike there should be a function for it.  The **fmtr** package also contains\nseveral functions that fall into this category.\n\n### Solution\n\nThe **fmtr** package was developed to address the above problems.  The package\naddresses those problems in the following ways:\n\n1. **Two formatting functions**:  With **fmtr**, all formatting has been \nconsolidated into two formatting functions: `fapply()` and `fdata()`.  `fapply()`\napplies a format to a vector.  `fdata()` applies formats to a data\nframe or tibble. The implementation of the `fapply()` function is \nreminiscent of a SAS® `put` function.\n\n2. **The format catalog**: The **fmtr** package also introduces the concept\nof a *format catalog* to R.  A format catalog is a collection of formats \nthat can be saved as a file, shared, and reused. This concept was taken\ndirectly from SAS® software.\n\n3. **User-defined format**: The **fmtr** package also improves on the native R \nformatting capabilities by introducing the concept of a *user-defined format*. \nA user-defined format is an expression-driven lookup.  You can define a set \nof logical expressions that, when true, will return a corresponding lookup \nvalue. The implementation of the user-defined format is similar to \na SAS® user-defined format.\n\n4. **The formatting list**: For complicated formats that require more than\none function, the **fmtr** package also introduces the concept of a \n*formatting list*.  A formatting list can perform operations that are difficult\nto accomplish otherwise.\n\n5. **Helper and Convenience functions**: Finally, the **fmtr** package contains \na set of functions to help you with common formatting tasks.\nFor instance, it has functions to assist \nin assigning formatting attributes to an entire data frame.  It also has\nsome ready-made functions to perform very common types of statistical \nformatting.\n\nAll together, the above capabilities make formatting with the **fmtr** package\nboth simpler and more powerful.  The reuse features also make R more suitable \nto team programming. \n\nFor additional reading, examples, and a complete function reference, refer to\nthe **fmtr** documentation site [here](https://fmtr.r-sassy.org/articles/fmtr.html).\n\n### Installation\n\nTo install the **fmtr** package, you\nmay do so by running the following command from your R console:\n\n    install.packages(\"fmtr\")\n\n\nThen put the following line at the top of your script:\n\n    library(fmtr)\n\nThe **fmtr** package will then be loaded, and available for use in your project.\n\nFor examples and usage information, please visit the **fmtr**\ndocumentation site [here](https://fmtr.r-sassy.org/articles/fmtr.html).\nThese examples will demonstrate the \nextraordinary usefulness of the formatting functions, and give you many ideas\non how and where to use the **fmtr** package.\n\n### Getting Help\n\nIf you need help with the **fmtr** package, the best place \nto turn to is the [fmtr](https://fmtr.r-sassy.org) web site. \nThis web site offers many examples, and full\ndocumentation on every function.  \n\nIf you want to look at the code for the **fmtr** package, visit the\ngithub page [here](https://github.com/dbosak01/fmtr).\n\nIf you encounter a bug or have a feature request, please submit your\nissue [here](https://github.com/dbosak01/fmtr/issues)\n\n### See Also\n\nThe **fmtr** package is part of the **sassy** meta-package. \nThe **sassy** meta-package includes several packages that help make R\neasier for SAS® programmers.  You can read more about the **sassy** package\n[here](https://sassy.r-sassy.org).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbosak01%2Ffmtr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbosak01%2Ffmtr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbosak01%2Ffmtr/lists"}