Package: arsenal 3.6.4.0000

Ethan Heinzen

arsenal: An Arsenal of 'R' Functions for Large-Scale Statistical Summaries

An Arsenal of 'R' functions for large-scale statistical summaries, which are streamlined to work within the latest reporting tools in 'R' and 'RStudio' and which use formulas and versatile summary statistics for summary tables and models. The primary functions include tableby(), a Table-1-like summary of multiple variable types 'by' the levels of one or more categorical variables; paired(), a Table-1-like summary of multiple variable types paired across two time points; modelsum(), which performs simple model fits on one or more endpoints for many variables (univariate or adjusted for covariates); freqlist(), a powerful frequency table across many categorical variables; comparedf(), a function for comparing data.frames; and write2(), a function to output tables to a document.

Authors:Ethan Heinzen [aut, cre], Jason Sinnwell [aut], Elizabeth Atkinson [aut], Tina Gunderson [aut], Gregory Dougherty [aut], Patrick Votruba [ctb], Ryan Lennon [ctb], Andrew Hanson [ctb], Krista Goergen [ctb], Emily Lundt [ctb], Brendan Broderick [ctb], Maddie McCullough [art]

arsenal_3.6.4.0000.tar.gz
arsenal_3.6.4.0000.zip(r-4.5)arsenal_3.6.4.0000.zip(r-4.4)arsenal_3.6.4.0000.zip(r-4.3)
arsenal_3.6.4.0000.tgz(r-4.4-any)arsenal_3.6.4.0000.tgz(r-4.3-any)
arsenal_3.6.4.0000.tar.gz(r-4.5-noble)arsenal_3.6.4.0000.tar.gz(r-4.4-noble)
arsenal_3.6.4.0000.tgz(r-4.4-emscripten)arsenal_3.6.4.0000.tgz(r-4.3-emscripten)
arsenal.pdf |arsenal.html
arsenal/json (API)
NEWS

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

Peer review:

Bug tracker:https://github.com/mayoverse/arsenal/issues

Datasets:

On CRAN:

baseline-characteristicsdescriptive-statisticsmodelingpaired-comparisonsreportingstatisticstableone

13.28 score 223 stars 16 packages 1.0k scripts 8.2k downloads 11 mentions 110 exports 6 dependencies

Last updated 3 months agofrom:73f1899edd. Checks:OK: 1 NOTE: 6. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 13 2024
R-4.5-winNOTENov 13 2024
R-4.5-linuxNOTENov 13 2024
R-4.4-winNOTENov 13 2024
R-4.4-macNOTENov 13 2024
R-4.3-winNOTENov 13 2024
R-4.3-macNOTENov 13 2024

Exports:%nin%allNAas.selectallas.tbstatas.tbstat_multirowbinomCIclogcode.chunkcomparedfcomparedf.controlcountcellpctcountNcountpctcountrowpctDate.mdydiffsformulizefreq.controlfreqlistgmeangmeanCIgmeansdgsdhas_strataincludeNAiqris.Dateis.freqlistis.modelsumis.selectallis.summary.freqlistis.summary.modelsumis.summary.tablebyis.tablebyis.yamlkeep.labelslabels<-loosen.labelsmdy.DatemeanCImeanpmsdmeanpmsemeansdmeansemedianmadmedianq1q3medianrangemedSurvmedTimemodelsummodelsum.controlmodpval.tablebymuck_up_mockstudyNn.diff.obsn.diffsna.modelsumna.pairedna.tablebynegbinNeventsNeventsSurvNmissNmiss2NmisspctNmisspct2NpctNriskNriskSurvNrowpctNsigntestordinalpadjustpairedpaired.controlpctq1q3relriskreplace2rowbinomCIrowpctselectallset_attrset_labelssmart.splitsurvivaltablebytableby.controltbfmtteststol.char.bothtol.char.casetol.char.nonetol.char.trimtol.date.absolutetol.factor.labelstol.factor.levelstol.factor.nonetol.logical.nonetol.NAtol.num.absolutetol.num.pcttol.num.percenttol.other.noneverbatimwrite2write2htmlwrite2pdfwrite2wordyaml

Dependencies:evaluategluehighrknitrxfunyaml

A Few Notes on Labels

Rendered fromlabels.Rmdusingknitr::rmarkdownon Nov 13 2024.

Last update: 2019-12-27
Started: 2017-08-02

The comparedf function

Rendered fromcomparedf.Rmdusingknitr::rmarkdownon Nov 13 2024.

Last update: 2020-01-14
Started: 2019-03-20

The freqlist function

Rendered fromfreqlist.Rmdusingknitr::rmarkdownon Nov 13 2024.

Last update: 2020-02-28
Started: 2016-12-13

The modelsum function

Rendered frommodelsum.Rmdusingknitr::rmarkdownon Nov 13 2024.

Last update: 2021-05-19
Started: 2016-12-13

The paired function

Rendered frompaired.Rmdusingknitr::rmarkdownon Nov 13 2024.

Last update: 2019-12-27
Started: 2018-07-18

The tableby function

Rendered fromtableby.Rmdusingknitr::rmarkdownon Nov 13 2024.

Last update: 2024-05-15
Started: 2016-12-13

The write2 function

Rendered fromwrite2.Rmdusingknitr::rmarkdownon Nov 13 2024.

Last update: 2020-10-14
Started: 2017-01-18

Readme and manuals

Help Manual

Help pageTopics
Not in%nin% nin
An Arsenal of 'R' Functions for Large-Scale Statistical Summariesarsenal
'arsenal' tables with common structurearsenal_table has_strata labels.arsenal_table labels<-.arsenal_table merge.arsenal_table merge.freqlist print.arsenal_table print.summary.arsenal_table [.arsenal_table [.tableby
Defunct functions in 'arsenal'arsenal-defunct
Deprecated functions in 'arsenal'arsenal-deprecated
as.data.frame.freqlistas.data.frame.freqlist
as.data.frame.modelsumas.data.frame.modelsum
as.data.frame.tablebyas.data.frame.tableby
Compare two data.frames and report differencescomparedf print.comparedf
Control settings for 'comparedf' functioncomparedf.control
'comparedf' tolerancescomparedf.tolerances tol.char.both tol.char.case tol.char.none tol.char.trim tol.date.absolute tol.factor.labels tol.factor.levels tol.factor.none tol.logical.none tol.NA tol.num.absolute tol.num.pct tol.num.percent tol.other.none
Extract differencesdiffs diffs.comparedf diffs.summary.comparedf n.diff.obs n.diff.obs.comparedf n.diff.obs.summary.comparedf n.diffs n.diffs.comparedf n.diffs.summary.comparedf
formulizeformulize
Control settings for 'freqlist' functionfreq.control
freqlistfreqlist freqlist.formula freqlist.table
Helper functions for freqlistfreqlist.internal head.summary.freqlist is.freqlist is.summary.freqlist sort.freqlist tail.summary.freqlist
Internal Functionsinternal.functions replace2 smart.split
Keep Labelskeep.labels keep.labels.data.frame keep.labels.default loosen.labels loosen.labels.data.frame loosen.labels.default [.keep_labels [<-.keep_labels
Labelslabels labels.data.frame labels.keep_labels labels<- labels<-.data.frame labels<-.default labels<-.keep_labels set_attr set_labels
Convert numeric dates to Date object, and vice versaDate.mdy is.Date mdy.Date
Mock study data for examplesmockstudy muck_up_mockstudy
Fit models over each of a set of independent variables with a response variablemodelsum
Control settings for 'modelsum' functionmodelsum.control
Family functions for modelsumclog modelsum.family negbin ordinal relrisk survival
Helper functions for modelsumis.modelsum is.summary.modelsum modelsum.internal na.modelsum
Some functions to handle NAsallNA includeNA includeNA.default includeNA.factor NA.operations
Adjust P-values for Multiple Comparisonspadjust padjust.default padjust.summary.tableby padjust.tableby
Summary Statistics of a Set of Independent Variables Paired Across Two Timepointspaired
Control settings for 'paired' functionpaired.control
Helper functions for pairedna.paired paired.internal
Make a column for "select all" inputas.matrix.selectall as.selectall is.na.selectall is.selectall selectall [.selectall
The summary method for a 'comparedf' objectprint.summary.comparedf summary.comparedf
summary.freqlistas.data.frame.summary.freqlist summary.freqlist
Summarize a 'modelsum' object.as.data.frame.summary.modelsum summary.modelsum
The summary method for a 'tableby' objectas.data.frame.summary.tableby summary.tableby
Summary Statistics of a Set of Independent Variables by a Categorical Variabletableby
Control settings for 'tableby' functiontableby.control
Helper functions for tablebyhead.tableby is.summary.tableby is.tableby modpval.tableby na.tableby Ops.tableby sort.tableby tableby.internal tail.tableby tests tests.tableby xtfrm.tableby
tableby Summary Statistics Functionsarsenal_max arsenal_mean arsenal_median arsenal_min arsenal_range arsenal_sd arsenal_sum arsenal_var binomCI count countcellpct countN countpct countrowpct gmean gmeanCI gmeansd gsd iqr meanCI meanpmsd meanpmse meansd meanse medianmad medianq1q3 medianrange medSurv medTime N Nevents NeventsSurv Nmiss Nmiss2 Nmisspct Nmisspct2 Npct Nrisk NriskSurv Nrowpct Nsigntest pct q1q3 rowbinomCI rowpct tableby.stats
Internal 'tableby' functionsas.tbstat as.tbstat_multirow tableby.stats.internal tbfmt
write2write2 write2.arsenal_table write2.character write2.code.chunk write2.comparedf write2.default write2.knitr_kable write2.list write2.summary.arsenal_table write2.summary.comparedf write2.verbatim write2.xtable write2.yaml
Helper functions for 'write2'code.chunk verbatim write2.internal
write2word, write2html, write2pdfwrite2html write2pdf write2specific write2word
Include a YAML header in 'write2'c.yaml is.yaml print.yaml yaml