Package: fmtr 1.7.3

fmtr: Easily Apply Formats to Data

Contains a set of functions that can be used to apply formats to data frames or vectors. The package aims to provide functionality similar to that of SAS® formats. Formats are assigned to the format attribute on data frame columns. Then when the fdata() function is called, a new data frame is created with the column data formatted as specified. The package also contains a value() function to create a user-defined format, similar to a SAS® user-defined format.

Authors:David Bosak [aut, cre], Chen Ling [aut]

fmtr_1.7.3.tar.gz
fmtr_1.7.3.zip(r-4.7)fmtr_1.7.3.zip(r-4.6)fmtr_1.7.3.zip(r-4.5)
fmtr_1.7.3.tgz(r-4.6-x86_64)fmtr_1.7.3.tgz(r-4.6-arm64)fmtr_1.7.3.tgz(r-4.5-x86_64)fmtr_1.7.3.tgz(r-4.5-arm64)
fmtr_1.7.3.tar.gz(r-4.7-arm64)fmtr_1.7.3.tar.gz(r-4.7-x86_64)fmtr_1.7.3.tar.gz(r-4.6-arm64)fmtr_1.7.3.tar.gz(r-4.6-x86_64)
fmtr_1.7.3.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
fmtr/json (API)

# Install 'fmtr' in R:
install.packages('fmtr', repos = c('https://dbosak01.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/dbosak01/fmtr/issues

Pkgdown/docs site:https://fmtr.r-sassy.org

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

fmtrformatformatsformattingcpp

9.33 score 15 stars 6 packages 115 scripts 1.5k downloads 34 exports 13 dependencies

Last updated from:a097142d82. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK157
linux-devel-x86_64OK158
source / vignettesOK193
linux-release-arm64OK149
linux-release-x86_64OK161
macos-release-arm64OK95
macos-release-x86_64OK315
macos-oldrel-arm64OK83
macos-oldrel-x86_64OK288
windows-develOK134
windows-releaseOK108
windows-oldrelOK109
wasm-releaseOK159

Exports:as.fcatas.flistas.fmtconditiondescriptionsdescriptions<-fapplyfapply2fattrfattr<-fcatfdataflistfmt_cnt_pctfmt_mean_sdfmt_mean_stderrfmt_medianfmt_nfmt_quantile_rangefmt_rangeformatsformats<-is.fcatis.flistis.formatjustificationjustification<-read.fcatread.flistvaluewidthswidths<-write.fcatwrite.flist

Dependencies:clicommoncrayongluelifecyclemagrittrpillarpkgconfigRcpprlangtibbleutf8vctrs

Complete Example 1
Program | Output | Log

Last update: 2025-11-26
Started: 2021-11-18

Complete Example 2
Program | Output | Log

Last update: 2025-11-26
Started: 2024-01-08

Helper Functions
Formatting Helper Functions

Last update: 2025-09-28
Started: 2020-12-21

Frequently Asked Questions
Index | Content | How do I format a data frame? | How can I add a new, formatted column to my dataframe? | How do I use a format as a lookup? | Where is the documentation for the formatting codes? | How do I assign formats from metadata to my data frame? | How do I assign labels from metadata to my data frame? | How do I assign descriptions from metadata to my data frame? | How do I create a format catalog? | How do I use formats from a format catalog? | How do I assign formats from a catalog to a data frame? | How do I create a format catalog from an Excel spreadsheet? | How do I export my format catalog to a spreadsheet? | Can I create a user-defined format from data? | Can I create an input format? | Can I create a numeric user-defined format? | Is there a way to set up a search path for a format catalog? | Is there a way to read in a format catalog from SAS®? | What happened to the labels() function? | Can I change a User-Defined Format after it has been created?

Last update: 2024-05-09
Started: 2021-11-18

fmtr
Key Functions | How to Use | The fapply() Function | A User-Defined Format | The fdata() Function | The fcat() Function | Next Steps

Last update: 2024-05-09
Started: 2020-12-09

Format and Combine
How to use fapply2() | Use with dplyr | Use with datastep | Using Assigned Formats | Format Catalog with datastep() | Use of Other Format Types

Last update: 2024-01-08
Started: 2024-01-08

Format Catalogs
The fcat() function

Last update: 2024-01-08
Started: 2020-12-21

Convenience Functions
The formats() function | The fattr() function | Other convenience functions

Last update: 2022-09-01
Started: 2020-12-21

Format Apply Function
How to use fapply() | What kind of formats are available | Formatting String | Named vectors | User-defined formats | Vectorized functions | A formatting list

Last update: 2022-08-15
Started: 2020-12-21

Format Data Function
How to use fdata()

Last update: 2020-12-28
Started: 2020-12-21

Readme and manuals

Help Manual

Help pageTopics
Convert a format catalog to a data frameas.data.frame.fcat
Casts a format to a data frameas.data.frame.fmt
Convert a formatting list to a data frameas.data.frame.fmt_lst
Generic casting method for format catalogsas.fcat
Convert a data frame to a format catalogas.fcat.data.frame
Convert a formatting list to a format catalogas.fcat.fmt_lst
Convert a list to a format catalogas.fcat.list
Convert a tibble to a format catalogas.fcat.tbl_df
Convert to a formatting listas.flist
Convert a data frame to a formatting listas.flist.data.frame
Convert a format catalog to a formatting listas.flist.fcat
Convert a list to a formatting listas.flist.list
Convert a tibble to a formatting listas.flist.tbl_df
Generic casting method for formatsas.fmt
Convert a data frame to a user-defined formatas.fmt.data.frame
Define a condition for a user-defined formatcondition
Get or set descriptions for data frame columnsdescriptions descriptions<-
Apply formatting to a vectorfapply
Apply formatting to two vectorsfapply2
Set formatting attributesfattr
Set formatting attributesfattr<-
Create a format catalogfcat
Format a data frame or tibblefdata
Create a formatting listflist
Formatted count and percentfmt_cnt_pct
Formatted mean and standard deviationfmt_mean_sd
Formatted mean and standard errorfmt_mean_stderr
Formatted Medianfmt_median
Formatted Countfmt_n
Formatted Quantile Rangefmt_quantile_range
Formatted Rangefmt_range
Get or set formats for a data frameformats formats<-
Formatting StringsFormattingStrings
Class test for a format catalogis.fcat
Is object a formatting listis.flist
Determine whether an object is a user-defined formatis.format
Get or set justification for data frame columnsjustification justification<-
Extract labels from a user-defined formatlabels.fmt
Print a format catalogprint.fcat
Print a formatprint.fmt
Print a formatting listprint.fmt_lst
Read a format catalog from the file systemread.fcat
Read a formatting list from the file systemread.flist
Create a user-defined formatvalue
Get or set column widths for a data framewidths widths<-
Write a format catalog to the file systemwrite.fcat
Write a formatting list to the file systemwrite.flist