{"id":13857638,"url":"https://github.com/mayoverse/arsenal","last_synced_at":"2025-10-22T06:07:24.975Z","repository":{"id":37418136,"uuid":"98549485","full_name":"mayoverse/arsenal","owner":"mayoverse","description":"An Arsenal of 'R' Functions for Large-Scale Statistical Summaries","archived":false,"fork":false,"pushed_at":"2024-08-15T15:42:28.000Z","size":6243,"stargazers_count":221,"open_issues_count":32,"forks_count":14,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-08-15T17:49:37.159Z","etag":null,"topics":["baseline-characteristics","cran","descriptive-statistics","modeling","paired-comparisons","r","r-package","reporting","statistics","tableone"],"latest_commit_sha":null,"homepage":"https://mayoverse.github.io/arsenal/","language":"R","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/mayoverse.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":null,"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}},"created_at":"2017-07-27T15:01:44.000Z","updated_at":"2024-08-15T15:42:32.000Z","dependencies_parsed_at":"2024-08-17T01:06:59.022Z","dependency_job_id":null,"html_url":"https://github.com/mayoverse/arsenal","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayoverse%2Farsenal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayoverse%2Farsenal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayoverse%2Farsenal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayoverse%2Farsenal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mayoverse","download_url":"https://codeload.github.com/mayoverse/arsenal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225920425,"owners_count":17545492,"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":["baseline-characteristics","cran","descriptive-statistics","modeling","paired-comparisons","r","r-package","reporting","statistics","tableone"],"created_at":"2024-08-05T03:01:42.740Z","updated_at":"2025-10-22T06:07:19.943Z","avatar_url":"https://github.com/mayoverse.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"\n# The `arsenal` Package \u003ca href=\"https://mayoverse.github.io/arsenal/\"\u003e\u003cimg src=\"man/figures/logo.png\" alt=\"Arsenal logo\" style=\"float:right;height:232.25px\" align=\"right\" height=\"232.25\"\u003e\u003c/a\u003e\n\n\u003c!-- badges: start --\u003e\n[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/arsenal)](https://CRAN.R-project.org/package=arsenal)\n[![Total Downloads](http://cranlogs.r-pkg.org/badges/grand-total/arsenal)](https://CRAN.R-project.org/package=arsenal)\n[![Downloads](http://cranlogs.r-pkg.org/badges/arsenal)](https://CRAN.R-project.org/package=arsenal)\n[![R-CMD-check](https://github.com/mayoverse/arsenal/workflows/R-CMD-check/badge.svg)](https://github.com/mayoverse/arsenal/actions)\n\u003c!-- badges: end --\u003e\n\n## Overview\n\nThe goal of `library(arsenal)` is to make statistical reporting easy. It includes many functions which the useR will find useful to have\nin his/her \"arsenal\" of functions. There are, at this time, 6 main functions, documented below. Each of these functions is\nmotivated by a local SAS macro or procedure of similar functionality.\n\nNote that `arsenal` v3.0.0 is not backwards compatible with previous versions (mainly because `compare()` got renamed to `comparedf()`).\nSee the `NEWS` file for more details.\n\n`arsenal` now has a `pkgdown` site: https://mayoverse.github.io/arsenal/\n\n## The `tableby()` Function\n\n`tableby()` is a function to easily summarize a set of independent variables by one or more categorical variables.\nOptionally, an appropriate test is performed to test the distribution of the independent variables across\nthe levels of the categorical variable. Options for this function are easily controlled using `tableby.control()`.\n\nThe `tableby()` output is easily knitted in an Rmarkdown document or displayed in the command line using the `summary()` function.\nOther S3 methods are implemented for objects from `tableby()`, including `print()`, `[`, `as.data.frame()`, `sort()`, `merge()`, `padjust()`,\n`head()`, and `tail()`.\n\n## The `paired()` Function\n\n`paired()` is a function to easily summarize a set of independent variables across two time points.\nOptionally, an appropriate test is performed to test the distribution of the independent variables across\nthe time points. Options for this function are easily controlled using `paired.control()`.\n\nThe `paired()` output is easily knitted in an Rmarkdown document or displayed in the command line using the `summary()` function.\nIt has the same S3 methods as `tableby()`, since it's a special case of the `tableby()` object.\n\n## The `modelsum()` Function\n\n`modelsum()` is a function to fit and summarize models for each independent variable with one or more response variables,\nwith options to adjust for covariates for each model. Options for this function are easily controlled using `modelsum.control()`.\n\nThe `modelsum` output is easily knitted in an Rmarkdown document or displayed in the command line using the `summary()` function.\nOther S3 methods are implemented for objects from `modelsum()`, including `print()`, `[`, `as.data.frame()`, and `merge()`.\n\n## The `freqlist()` Function\n\n`freqlist()` is a function to approximate the output from SAS's `PROC FREQ` procedure when using the `/list` option of the `TABLE` statement.\nOptions for this function are easily controlled using `freq.control()`.\n\nThe `freqlist()` output is easily knitted in an Rmarkdown document or displayed in the command line using the `summary()` function.\nOther S3 methods are implemented for objects from `freqlist()`, including `print()`, `[`, `as.data.frame()`, `sort()`, and `merge()`.\nAdditionally, the `summary()` output can be used with `head()` or `tail()`.\n\n## The `comparedf()` Function\n\n`comparedf()` compares two data.frames and reporting any differences between them,\nmuch like SAS's `PROC COMPARE` procedure.\n\nThe `comparedf()` output is easily knitted in an Rmarkdown document or displayed in the command line using the `summary()` function.\nOther S3 methods are implemented for objects of class `\"comparedf\"`, including `print()`, `n.diffs()`, `n.diff.obs()`, and `diffs()`.\n\n## The `write2*()` Family of Functions\n\n`write2word()`, `write2pdf()`, and `write2html()` are functions to output a table into a document, much like SAS's `ODS` procedure.\n  The S3 method behind them is `write2()`. There are methods implemented for `tableby()`, `modelsum()`, `freqlist()`, and `comparedf()`, and\n  also methods for `knitr::kable()`, `xtable::xtable()`, and `pander::pander_return()`. Another option is to coerce an object using\n  `verbatim()` to print out the results monospaced (as if they were in the terminal)--the default method does this automatically.\n  To output multiple tables into a document, simply make a list of them and call the same function as before. A YAML\n  header can be added using `yaml()`. Code chunks can be written using `code.chunk()`.\n  \n  For more information, see `vignette(\"write2\")`.\n\n## Other Notable Functions\n\n* `keep.labels()` keeps the `'label'` attribute on an R object when subsetting. `loosen.labels()` allows the labels to drop again.\n\n* `formulize()` is a shortcut to collapse variable names into a formula.\n\n* `mdy.Date()` and `Date.mdy()` convert numeric dates for month, day, and year to Date object, and vice versa.\n\n* `is.Date`: tests if an object is a date.\n\n* `%nin%` tests for \"not in\", the negation of `%in%`.\n\n* `allNA()` tests for all elements being NA, and `includeNA()` makes NAs explicit values.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayoverse%2Farsenal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmayoverse%2Farsenal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayoverse%2Farsenal/lists"}