Skip to content

Commit

Permalink
version 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eheinzen authored and cran-robot committed Jan 31, 2017
1 parent 6e2643b commit 3e9908f
Show file tree
Hide file tree
Showing 48 changed files with 7,570 additions and 1,756 deletions.
17 changes: 11 additions & 6 deletions DESCRIPTION
@@ -1,15 +1,18 @@
Package: arsenal
Title: An Arsenal of 'R' Functions for Large-Scale Statistical
Summaries
Version: 0.1.2
Date: 2016-12-29
Version: 0.2.0
Date: 2017-01-31
URL: https://cran.r-project.org/package=arsenal
Authors@R: c(
person("Ethan", "Heinzen", email = "heinzen.ethan@mayo.edu", role = c("aut", "cre")),
person("Jason", "Sinnwell", role="aut"),
person("Elizabeth", "Atkinson", role="aut"),
person("Tina", "Gunderson", role="aut"),
person("Gregory", "Dougherty", role="aut"),
person("Patrick", "Votruba", role="ctb"),
person("Ryan", "Lennon", role="ctb"),
person("Krista", "Goergen", role="ctb"),
person("Emily", "Lundt", role="ctb")
)
Description: An Arsenal of 'R' functions for large-scale statistical summaries,
Expand All @@ -20,22 +23,24 @@ Description: An Arsenal of 'R' functions for large-scale statistical summaries,
variable; modelsum(), which performs simple model fits on the same endpoint
for many variables (univariate or adjusted for standard covariates);
and freqlist(), a powerful frequency table across many categorical variables.
Suggests: knitr, rmarkdown, xtable, survival, testthat, coin, pROC,
MASS, gam, rpart
Suggests: knitr, rmarkdown, xtable, pander, survival, testthat, coin,
pROC, MASS, gam, rpart
Depends: R (>= 3.2.0), stats (>= 3.2.0)
Imports: broom, stringr
VignetteBuilder: knitr
License: GPL (>= 2)
RoxygenNote: 5.0.1
NeedsCompilation: no
Packaged: 2016-12-29 15:03:54 UTC; m144326
Packaged: 2017-01-31 23:21:39 UTC; m144326
Author: Ethan Heinzen [aut, cre],
Jason Sinnwell [aut],
Elizabeth Atkinson [aut],
Tina Gunderson [aut],
Gregory Dougherty [aut],
Patrick Votruba [ctb],
Ryan Lennon [ctb],
Krista Goergen [ctb],
Emily Lundt [ctb]
Maintainer: Ethan Heinzen <heinzen.ethan@mayo.edu>
Repository: CRAN
Date/Publication: 2016-12-30 01:18:42
Date/Publication: 2017-02-01 00:41:55
80 changes: 46 additions & 34 deletions MD5
@@ -1,66 +1,78 @@
966d309a0df5d55be152e36454793ba7 *DESCRIPTION
3f62d030021234740076da4d1ba8f002 *NAMESPACE
a5124b7fb1a608cf22414d0d439c5893 *NEWS.md
babe9da5c34ab0be1462ebb582b67f01 *R/arsenal.R
64ca95954a157e40c441927a12517109 *DESCRIPTION
163a641c4257c9de5b13411233a96e6d *NAMESPACE
ed12d43b046ac8b13ad042d42dd7dcf4 *NEWS.md
9e5c80edccdf89f7401dc898be315b6a *R/arsenal.R
79e2033244f329fa85d87cbc4013f678 *R/formulize.R
cfa9ea4571efbb3e9de3bc79dcc56041 *R/freqlist.R
9b361e8234e2f7dbdb5bf8abad07e12a *R/freqlist.R
e42ce669505128b0f0b20ac6c621e91d *R/freqlist.internal.R
02a7e6a76fe38503ed55d6d0da6e12dd *R/internal.functions.R
75cce2779e3a321a78e8cd56f6e42b6a *R/internal.functions.R
2f474534e9fc946996d331ad8103b5ea *R/magic8.R
e54a23c0326058d798de6b3c912a8003 *R/mdy.Date.R
1de6a042544ab82b1d3e5d5264e3ffe9 *R/mockstudy.R
8a60fb9fd3e6b75451fd52a671343fdf *R/modelsum.R
db9d7550daea1f2251908395723b6606 *R/modelsum.R
8972abaedd55f0c7f1418ad70f233302 *R/modelsum.control.R
8c879e7ce937bdbedb5fd3fb31a11d3f *R/modelsum.internal.R
0e56f25775a178e261295319e70889bd *R/not.in.R
50cd5149107450c83f3e3f855aeb57ad *R/release_questions.R
915d58ab60615cd9c66bfc92131cfba1 *R/summary.freqlist.R
1dff52d601070cac366b7123de8f8680 *R/summary.modelsum.R
e3eaad9fb39c372f2ed4aeaddf303289 *R/summary.modelsum.R
318e7c0c95e3737f5c209a9ba9ebea7b *R/summary.tableby.R
918558ed28af0fd4f0338c9d9787b926 *R/tableby.R
5df40ef875f0a8d2d7ffdca177c051d5 *R/tableby.R
6cd26e41a5b57be0697d1e98594fb16d *R/tableby.control.R
4b5df64d48a8f090b29f7eb55008b5db *R/tableby.internal.R
9bb29fd9186f2e7c11351693f70aa2e8 *R/tableby.stat.tests.R
d795cb92f9d3e5ec846b31c0579badd3 *R/tableby.stats.R
872993fdbe93e6707fae16f6e0a0c99f *R/write2.R
018618b1d1fb15a1945e7892e2868204 *README.md
4aafc7bc18223c036874a46def9050bc *build/vignette.rds
56b73ad8b0d8ae2da6a8cd8e0934749e *R/write2.R
9978346e6d56e7fcdf127d79f01a7649 *README.md
e91dac73925af6b800aafec7b3780ab6 *build/vignette.rds
30cd2d9369ee4d94dd76dcbf5a215559 *data/mockstudy.RData
79433ae6628afba73b4751b5e6bbb32e *inst/doc/freqlist.R
b90b634df89f2a4dc597b834d4a0457d *inst/doc/freqlist.Rmd
197db4ba70c32f0a3579ba56e71b8c7b *inst/doc/freqlist.pdf
2be512c16c57f0c19d46a03559fa66ed *inst/doc/modelsum.R
cfe0b0bd54ea0d5dd64b179d025a5621 *inst/doc/modelsum.Rmd
85570c3c621adb383c345f2e09bd5a1e *inst/doc/modelsum.html
48ac3590253a78deafa97b9c8a30ba4f *inst/doc/tableby.R
0f686caa3862dd071b6538bd17b5d0c8 *inst/doc/tableby.Rmd
78a397ba49bf53164ac6bf6eb5278c0b *inst/doc/tableby.html
fb7f3dd8cf45309fc533d5cb863271b8 *man/arsenal.Rd
6426e345a14c9dec20d62c6456c4e9f0 *inst/doc/freqlist.R
d81e95828e521941e139482c962e9710 *inst/doc/freqlist.Rmd
37d87dba1400ad18ec9abbba8dda1cbf *inst/doc/freqlist.html
92e0994599563842bd6a019ec6ea4102 *inst/doc/modelsum.R
7b5d1fa9bc0c43d57a226738d4b54c7f *inst/doc/modelsum.Rmd
b540f480e5ac4f64684563ef0e97666d *inst/doc/modelsum.html
a68ec9f4260ce8c2c93e5a85f6c673e2 *inst/doc/tableby.R
d19754caf6254260ec847743d8b228db *inst/doc/tableby.Rmd
eb330c6faaa31ef5f91bcf135056faad *inst/doc/tableby.html
2be7ca8e41f22208b476876029e80657 *inst/doc/write2.R
403d798936814c679eeaa22ea6180ff7 *inst/doc/write2.Rmd
2301d10e20887d78abda3bdd2d52d5b3 *inst/doc/write2.html
33f826e2f2c76b4f19e4f032d67fac58 *man/arsenal.Rd
a08790dee110e6f91216f1c9f7b9888e *man/as.data.frame.freqlist.Rd
fb7c429f3c12092d0fad2dc88754fd8f *man/as.data.frame.modelsum.Rd
cedee07e345ad606f41d35fb7c5c208c *man/as.data.frame.modelsum.Rd
1326c71d7954bf79cd26895f0aedd30f *man/as.data.frame.tableby.Rd
2133b459a58b59f77b1e835fafc009e6 *man/formulize.Rd
c15c3a5f78637e5ac782800687fd2289 *man/freqlist.Rd
b149f67287b2605109b516fbd9ef8f20 *man/freqlist.internal.Rd
5148640645d5b9f0de27a83ba4ed6788 *man/grapes-nin-grapes.Rd
2e1f8c2d941134f65a82f84346247458 *man/mdy.Date.Rd
4cd57758131c3d1dffce65879eb34e76 *man/mockstudy.Rd
fb624ea9b801473dae9d30eefe8a1047 *man/modelsum.Rd
1d876b7eb1a077a5220759b72535f65c *man/modelsum.Rd
ee7241120bee38b7c92d9160f86699e0 *man/modelsum.control.Rd
56b926cfc2d81c0539e70ca8a4d68794 *man/modelsum.internal.Rd
562faf3ed641a245644af5887f5704aa *man/summary.freqlist.Rd
1a749d94bb67684290e8d11927700f0d *man/summary.modelsum.Rd
0ab1c3227e5d79e9a4419e0546fbaa77 *man/summary.modelsum.Rd
b03d9fe7d9940a052a7b539b58a4f2c5 *man/summary.tableby.Rd
d8894b3a8db813af90570d664d3009dd *man/tableby.Rd
43e9f7d6d6a5c5316f98dc1bdc78e3c1 *man/tableby.Rd
e60ebe8ed16f9112a141ec2b24574b10 *man/tableby.control.Rd
c00a698159af17705b7306ce44e2070b *man/tableby.internal.Rd
a7d8a4fca049fadfeb6be460b35a209f *man/tableby.stats.Rd
6d0a923e8398c923744d26bcbb44ddc3 *man/write2.Rd
fa58b2bb17f00974410a7d06f6b20b83 *man/write2.Rd
013f6556b9cd188c26365af8f42c1ec7 *man/write2specific.Rd
b86d96d2b720f7aeeb3b9412b87d67ef *tests/testthat.R
ba8ab9b99798b694a5f5b06b9a28f2d8 *tests/testthat/test_formulize.R
6811553415304e4626ae831d29c1d680 *tests/testthat/test_freqlist.R
d4732617af6ee210bbdc165014b5a4b2 *tests/testthat/test_modelsum.R
357806abad78c1b6ca0c358d6d4d9b4a *tests/testthat/test_tableby.R
b90b634df89f2a4dc597b834d4a0457d *vignettes/freqlist.Rmd
cfe0b0bd54ea0d5dd64b179d025a5621 *vignettes/modelsum.Rmd
0f686caa3862dd071b6538bd17b5d0c8 *vignettes/tableby.Rmd
1c0b875954db84c2384bf6d753d50146 *tests/testthat/test_formulize.R
2943f65b203a330bfde7f22fbd0967d9 *tests/testthat/test_freqlist.R
8016a1934078062f9128e70b1943a8fb *tests/testthat/test_modelsum.R
d37c1af2099852398edf4aa01295a6bf *tests/testthat/test_tableby.R
1c732994556af5cd482c218cf6c039d8 *tests/testthat/test_write2.R
f177f2b74b4f9f751e8edbb6a9fad712 *tests/testthat/write2.freqlist.html
0a7b3e0ee537b49cf7ed5c11b1a4fecd *tests/testthat/write2.kable.html
83bfb15f5b9103e625c16cbccbfad808 *tests/testthat/write2.modelsum.html
61cdf411f2af5411f89903cba990ea9e *tests/testthat/write2.pander.html
f43dc701ee19bf489fa31c12c1f9ffb1 *tests/testthat/write2.tableby.html
f00648a7b68d7c41a326ef44d2129152 *tests/testthat/write2.xtable.html
d81e95828e521941e139482c962e9710 *vignettes/freqlist.Rmd
7b5d1fa9bc0c43d57a226738d4b54c7f *vignettes/modelsum.Rmd
d19754caf6254260ec847743d8b228db *vignettes/tableby.Rmd
403d798936814c679eeaa22ea6180ff7 *vignettes/write2.Rmd
8 changes: 8 additions & 0 deletions NAMESPACE
Expand Up @@ -21,6 +21,13 @@ S3method(summary,freqlist)
S3method(summary,modelsum)
S3method(summary,tableby)
S3method(tests,tableby)
S3method(write2,character)
S3method(write2,default)
S3method(write2,freqlist)
S3method(write2,knitr_kable)
S3method(write2,modelsum)
S3method(write2,tableby)
S3method(write2,xtable)
export("%nin%")
export("labels<-")
export(Date.mdy)
Expand All @@ -44,6 +51,7 @@ export(q1q3)
export(tableby)
export(tableby.control)
export(tests)
export(write2)
export(write2html)
export(write2pdf)
export(write2word)
Expand Down
9 changes: 9 additions & 0 deletions NEWS.md
@@ -1,3 +1,12 @@
# arsenal 0.2.0

* Vignettes have been updated.

* `write2()` is now exported and supports all output formats supported by `rmarkdown::render()`. There is now a vignette for it
and the S3 methods have been expanded to handle more inputs, including `knitr::kable()`, `xtable::xtable()`, and `pander::pander_return()`.

* Fixed a bug in `summary.modelsum()`.

# arsenal 0.1.2

* `broom` and `stringr` have been moved to `imports` instead of `depends`.
Expand Down
5 changes: 4 additions & 1 deletion R/arsenal.R
Expand Up @@ -6,6 +6,8 @@
#' 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 package download, NEWS, and README are available on CRAN: \url{https://cran.r-project.org/package=arsenal}
#'
#' @section Functions:
#'
Expand All @@ -19,6 +21,8 @@
#'
#' \code{\link{write2word}}, \code{\link{write2html}}, \code{\link{write2pdf}}: Functions to generate a word, html, or pdf document containing a single table.
#'
#' \code{\link{write2}}: Functions to generate a single document containing a single table. (Also the S3 backbone behind the \code{write2*} functions.)
#'
#' \code{\link{formulize}}: A shortcut to generate one-, two-, or many-sided formulas.
#'
#' \code{\link{mdy.Date}} and \code{\link{Date.mdy}}: Convert numeric dates for month, day, and year to Date object, and vice versa.
Expand All @@ -36,7 +40,6 @@
NULL

#### commands to build the package using devtools
# devtools::document()
# devtools::check_man()
# devtools::test()
# devtools::check()
Expand Down
2 changes: 1 addition & 1 deletion R/freqlist.R
Expand Up @@ -131,7 +131,7 @@ freqlist <- function(tab, sparse = FALSE, na.options = c('include', 'showexclude
#' @export
print.freqlist <- function(x, ...)
{
cat("Freqlist object\n\n")
cat("Freqlist Object\n\n")
cat(ncol(x$freqlist) - 4, " variables:\n", sep = "")
print(colnames(x$freqlist)[1:(ncol(x$freqlist) - 4)])
invisible(x)
Expand Down
2 changes: 1 addition & 1 deletion R/internal.functions.R
Expand Up @@ -498,7 +498,7 @@ makePaddedStr <- function(startStr, size, padChar = ' ') {
}

# See if can split the string on a reasonable boundary character
for (split in c(" ", "\t", "_", "-", "*", ".", ";", ":")) {
for (split in c(" ", "\t", "_", "-",".", ";", ":")) {
results <- strsplit(startStr, split, fixed = TRUE)[[1]]
if ((length(results) > 1) && (minStrLen(results) <= size))
return(pastePaddedStr(results, size, sep = split, padChar = padChar, appendSep = TRUE))
Expand Down
11 changes: 6 additions & 5 deletions R/modelsum.R
Expand Up @@ -47,13 +47,14 @@
#'
#' data(mockstudy)
#'
#' tab1 <- modelsum(bmi ~ sex + age, data=mockstudy)
#' summary(tab1, text=TRUE)
#' tab1 <- modelsum(bmi ~ sex + age, data = mockstudy)
#' summary(tab1, text = TRUE)
#'
#' tab2 <- modelsum(alk.phos ~ arm + ps + hgb, adjust= ~age + sex, family="gaussian",data=mockstudy)
#' summary(tab2, text=TRUE)
#' tab2 <- modelsum(alk.phos ~ arm + ps + hgb, adjust = ~ age + sex,
#' family = "gaussian", data = mockstudy)
#' summary(tab2, text = TRUE)
#'
#' summary(tab2, show.intercept=FALSE, text=TRUE)
#' summary(tab2, show.intercept = FALSE, text = TRUE)
#'
#' tab2.df <- as.data.frame(tab2)
#'
Expand Down
2 changes: 1 addition & 1 deletion R/summary.modelsum.R
Expand Up @@ -14,7 +14,7 @@ modelsum.translations <- list() ## adj.r.squared = "adj.rsq", sex = "Sex", sexM
#' @param object The data defining the table to display
#' @param title Title for the table, defaults to \code{NULL} (no title)
#' @param labelTranslations List where name is the label in the output, and value is the label you
#' want displayed e.g. \code{list (q1q3: "Q1, Q3", medsurv = "Median Survival")}.
#' want displayed e.g. \code{list(q1q3 = "Q1, Q3", medsurv = "Median Survival")}.
#' @param digits Maximum number of digits to display for floating point numbers.
#' If \code{NA} (default), it uses the value from \code{object$control$digits}
#' (whose default is 3, which would result in, e.g., 12.3, 1.23, 0.123, and 0.012).
Expand Down
2 changes: 1 addition & 1 deletion R/tableby.R
Expand Up @@ -111,7 +111,7 @@
#' tab1 <- tableby(arm ~ sex + age, data=mockstudy)
#' summary(tab1, text=TRUE)
#'
#' mylabels <- list( sex = "SEX", age ="Age, yrs")
#' mylabels <- list(sex = "SEX", age ="Age, yrs")
#' summary(tab1, labelTranslations = mylabels, text=TRUE)
#'
#' tab3 <- tableby(arm ~ sex + age, data=mockstudy, test=FALSE, total=FALSE,
Expand Down

0 comments on commit 3e9908f

Please sign in to comment.