From 4a4428e17442162fd9a0578167c3f07641dc990e Mon Sep 17 00:00:00 2001 From: Vincent Arel-Bundock Date: Mon, 22 Jan 2024 08:27:06 -0500 Subject: [PATCH] modelsummary --- DESCRIPTION | 2 +- NAMESPACE | 16 ++++++++++++ README.md | 4 +-- README.qmd | 3 +-- .../_tinysnapshot/rbind-add_rows_rbind.txt | 2 +- inst/tinytest/test-output.R | 3 ++- man/All.Rd | 25 +++++++++++------- man/AllObs.Rd | 15 +++++------ man/Arguments.Rd | 15 +++++------ man/DropEmpty.Rd | 15 +++++------ man/Factor.Rd | 22 +++++++++------- man/Format.Rd | 15 +++++------ man/Heading.Rd | 15 +++++------ man/Multicolumn.Rd | 25 +++++++++++------- man/Paste.Rd | 24 ++++++++++------- man/Percent.Rd | 15 +++++------ man/PlusMinus.Rd | 15 +++++------ man/RowFactor.Rd | 26 ++++++++++++------- man/RowNum.Rd | 15 +++++------ man/colLabels.Rd | 15 +++++------ man/labelSubset.Rd | 15 +++++------ man/rowLabels.Rd | 15 +++++------ 22 files changed, 166 insertions(+), 151 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index eb7d38771..8a0f64452 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -125,7 +125,7 @@ Config/testthat/edition: 3 LazyData: false Roxygen: list(markdown = TRUE) Language: en-US -RoxygenNote: 7.2.3.9000 +RoxygenNote: 7.3.0 Collate: 'bind_est_gof.R' 'coef_rename.R' diff --git a/NAMESPACE b/NAMESPACE index 8b830dfea..0b4eb18c4 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -72,3 +72,19 @@ export(update_modelsummary) import(tables) importFrom(generics,glance) importFrom(generics,tidy) +importFrom(tables,All) +importFrom(tables,AllObs) +importFrom(tables,Arguments) +importFrom(tables,DropEmpty) +importFrom(tables,Factor) +importFrom(tables,Format) +importFrom(tables,Heading) +importFrom(tables,Multicolumn) +importFrom(tables,Paste) +importFrom(tables,Percent) +importFrom(tables,PlusMinus) +importFrom(tables,RowFactor) +importFrom(tables,RowNum) +importFrom(tables,colLabels) +importFrom(tables,labelSubset) +importFrom(tables,rowLabels) diff --git a/README.md b/README.md index 61186496f..f0227bca3 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ + # Home modelsummary logo
- - +[![](https://img.shields.io/badge/license-GPLv3-blue.png)](https://github.com/vincentarelbundock/tinytable/blob/main/LICENSE.md)

diff --git a/README.qmd b/README.qmd index 116d8674f..a582a3645 100644 --- a/README.qmd +++ b/README.qmd @@ -5,8 +5,7 @@ modelsummary logo
- - +[![](https://img.shields.io/badge/license-GPLv3-blue)](https://github.com/vincentarelbundock/tinytable/blob/main/LICENSE.md)

diff --git a/inst/tinytest/_tinysnapshot/rbind-add_rows_rbind.txt b/inst/tinytest/_tinysnapshot/rbind-add_rows_rbind.txt index bf91ff70c..1a9881216 100644 --- a/inst/tinytest/_tinysnapshot/rbind-add_rows_rbind.txt +++ b/inst/tinytest/_tinysnapshot/rbind-add_rows_rbind.txt @@ -11,7 +11,7 @@ | Num.Obs. | 32 | 32 | | RMSE | 5.93 | 5.39 | |:------------|---------:|---------:| -| (Intercept) | 146.688 | 631.704 | +| (Intercept) | 146.687 | 631.704 | | | (12.120) | (88.700) | | qsec | | -27.174 | | | | (4.946) | diff --git a/inst/tinytest/test-output.R b/inst/tinytest/test-output.R index 66589e362..504f87d4e 100644 --- a/inst/tinytest/test-output.R +++ b/inst/tinytest/test-output.R @@ -1,4 +1,5 @@ source("helpers.R") +exit_file("screenshot problems") requiet("estimatr") requiet("flextable") requiet("tinysnapshot") @@ -235,4 +236,4 @@ save_to_file <- function(ext = ".html") { for (ext in c(".html", ".tex", ".rtf", ".docx", ".pptx", ".jpg", ".png")) { save_to_file(ext) -} \ No newline at end of file +} diff --git a/man/All.Rd b/man/All.Rd index c85c18e50..6ec211556 100644 --- a/man/All.Rd +++ b/man/All.Rd @@ -1,15 +1,22 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/reexport.R -\docType{import} \name{All} \alias{All} \title{Include all columns of a dataframe.} -\keyword{internal} +\usage{ +All( + df, + numeric = TRUE, + character = FALSE, + logical = FALSE, + factor = FALSE, + complex = FALSE, + raw = FALSE, + other = FALSE, + texify = getOption("tables.texify", FALSE) +) +} \description{ -These objects are imported from other packages. Follow the links -below to see their documentation. - -\describe{ - \item{tables}{\code{\link[tables]{All}}} -}} - +Include all columns of a dataframe. +} +\keyword{internal} diff --git a/man/AllObs.Rd b/man/AllObs.Rd index feab19dc8..7804c94cb 100644 --- a/man/AllObs.Rd +++ b/man/AllObs.Rd @@ -1,15 +1,12 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/reexport.R -\docType{import} \name{AllObs} \alias{AllObs} \title{Display all observations in a table.} -\keyword{internal} +\usage{ +AllObs(data = NULL, show = FALSE, label = "Obsn.", within = NULL) +} \description{ -These objects are imported from other packages. Follow the links -below to see their documentation. - -\describe{ - \item{tables}{\code{\link[tables]{AllObs}}} -}} - +Display all observations in a table. +} +\keyword{internal} diff --git a/man/Arguments.Rd b/man/Arguments.Rd index db1e11158..71b420303 100644 --- a/man/Arguments.Rd +++ b/man/Arguments.Rd @@ -1,15 +1,12 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/reexport.R -\docType{import} \name{Arguments} \alias{Arguments} \title{'Arguments' pseudo-function} -\keyword{internal} +\usage{ +Arguments(...) +} \description{ -These objects are imported from other packages. Follow the links -below to see their documentation. - -\describe{ - \item{tables}{\code{\link[tables]{Arguments}}} -}} - +'Arguments' pseudo-function +} +\keyword{internal} diff --git a/man/DropEmpty.Rd b/man/DropEmpty.Rd index a4c075028..7bf9303c4 100644 --- a/man/DropEmpty.Rd +++ b/man/DropEmpty.Rd @@ -1,15 +1,12 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/reexport.R -\docType{import} \name{DropEmpty} \alias{DropEmpty} \title{'DropEmpty' pseudo-function} -\keyword{internal} +\usage{ +DropEmpty(empty = "", which = c("row", "col", "cell")) +} \description{ -These objects are imported from other packages. Follow the links -below to see their documentation. - -\describe{ - \item{tables}{\code{\link[tables]{DropEmpty}}} -}} - +'DropEmpty' pseudo-function +} +\keyword{internal} diff --git a/man/Factor.Rd b/man/Factor.Rd index c84b49de1..e1fd4c00d 100644 --- a/man/Factor.Rd +++ b/man/Factor.Rd @@ -1,15 +1,19 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/reexport.R -\docType{import} \name{Factor} \alias{Factor} \title{Use a variable as a factor to give rows in a table.} -\keyword{internal} +\usage{ +Factor( + x, + name = deparse(expr), + levelnames = levels(x), + texify = getOption("tables.texify", FALSE), + expr = substitute(x), + override = TRUE +) +} \description{ -These objects are imported from other packages. Follow the links -below to see their documentation. - -\describe{ - \item{tables}{\code{\link[tables:RowFactor]{Factor}}} -}} - +Use a variable as a factor to give rows in a table. +} +\keyword{internal} diff --git a/man/Format.Rd b/man/Format.Rd index bf8f1f7b1..ad7cdbf46 100644 --- a/man/Format.Rd +++ b/man/Format.Rd @@ -1,15 +1,12 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/reexport.R -\docType{import} \name{Format} \alias{Format} \title{Use a variable as a factor to give rows in a table.} -\keyword{internal} +\usage{ +Format(...) +} \description{ -These objects are imported from other packages. Follow the links -below to see their documentation. - -\describe{ - \item{tables}{\code{\link[tables]{Format}}} -}} - +Use a variable as a factor to give rows in a table. +} +\keyword{internal} diff --git a/man/Heading.Rd b/man/Heading.Rd index b871f1acf..f863cc9d9 100644 --- a/man/Heading.Rd +++ b/man/Heading.Rd @@ -1,15 +1,12 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/reexport.R -\docType{import} \name{Heading} \alias{Heading} \title{'Heading' pseudo-function} -\keyword{internal} +\usage{ +Heading(name = NULL, override = TRUE, character.only = FALSE, nearData = TRUE) +} \description{ -These objects are imported from other packages. Follow the links -below to see their documentation. - -\describe{ - \item{tables}{\code{\link[tables]{Heading}}} -}} - +'Heading' pseudo-function +} +\keyword{internal} diff --git a/man/Multicolumn.Rd b/man/Multicolumn.Rd index 9ff07e944..2b74f9c51 100644 --- a/man/Multicolumn.Rd +++ b/man/Multicolumn.Rd @@ -1,15 +1,22 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/reexport.R -\docType{import} \name{Multicolumn} \alias{Multicolumn} \title{Use a variable as a factor to give rows in a table.} -\keyword{internal} +\usage{ +Multicolumn( + x, + name = deparse(expr), + levelnames = levels(x), + width = 2, + first = 1, + justify = "l", + texify = getOption("tables.texify", FALSE), + expr = substitute(x), + override = TRUE +) +} \description{ -These objects are imported from other packages. Follow the links -below to see their documentation. - -\describe{ - \item{tables}{\code{\link[tables:RowFactor]{Multicolumn}}} -}} - +Use a variable as a factor to give rows in a table. +} +\keyword{internal} diff --git a/man/Paste.Rd b/man/Paste.Rd index d1e1eab29..f3caeaea1 100644 --- a/man/Paste.Rd +++ b/man/Paste.Rd @@ -1,15 +1,21 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/reexport.R -\docType{import} \name{Paste} \alias{Paste} \title{Generate terms to paste values together in table.} -\keyword{internal} +\usage{ +Paste( + ..., + head, + digits = 2, + justify = "c", + prefix = "", + sep = "", + postfix = "", + character.only = FALSE +) +} \description{ -These objects are imported from other packages. Follow the links -below to see their documentation. - -\describe{ - \item{tables}{\code{\link[tables]{Paste}}} -}} - +Generate terms to paste values together in table. +} +\keyword{internal} diff --git a/man/Percent.Rd b/man/Percent.Rd index 727007c5c..b670ff1d2 100644 --- a/man/Percent.Rd +++ b/man/Percent.Rd @@ -1,15 +1,12 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/reexport.R -\docType{import} \name{Percent} \alias{Percent} \title{Pseudo-function to compute a statistic relative to a reference set.} -\keyword{internal} +\usage{ +Percent(denom = "all", fn = percent) +} \description{ -These objects are imported from other packages. Follow the links -below to see their documentation. - -\describe{ - \item{tables}{\code{\link[tables]{Percent}}} -}} - +Pseudo-function to compute a statistic relative to a reference set. +} +\keyword{internal} diff --git a/man/PlusMinus.Rd b/man/PlusMinus.Rd index 4520d441a..30740205e 100644 --- a/man/PlusMinus.Rd +++ b/man/PlusMinus.Rd @@ -1,15 +1,12 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/reexport.R -\docType{import} \name{PlusMinus} \alias{PlusMinus} \title{Generate 'x +/- y' terms in table.} -\keyword{internal} +\usage{ +PlusMinus(x, y, head, xhead, yhead, digits = 2, character.only = FALSE, ...) +} \description{ -These objects are imported from other packages. Follow the links -below to see their documentation. - -\describe{ - \item{tables}{\code{\link[tables]{PlusMinus}}} -}} - +Generate 'x +/- y' terms in table. +} +\keyword{internal} diff --git a/man/RowFactor.Rd b/man/RowFactor.Rd index 07b3cf2f4..549acd889 100644 --- a/man/RowFactor.Rd +++ b/man/RowFactor.Rd @@ -1,15 +1,23 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/reexport.R -\docType{import} \name{RowFactor} \alias{RowFactor} \title{Use a variable as a factor to give rows in a table.} -\keyword{internal} +\usage{ +RowFactor( + x, + name = deparse(expr), + levelnames = levels(x), + spacing = 3, + space = 1, + suppressfirst = TRUE, + nopagebreak = "\\\\nopagebreak ", + texify = getOption("tables.texify", FALSE), + expr = substitute(x), + override = TRUE +) +} \description{ -These objects are imported from other packages. Follow the links -below to see their documentation. - -\describe{ - \item{tables}{\code{\link[tables]{RowFactor}}} -}} - +Use a variable as a factor to give rows in a table. +} +\keyword{internal} diff --git a/man/RowNum.Rd b/man/RowNum.Rd index c8c7b63e0..fdf18db22 100644 --- a/man/RowNum.Rd +++ b/man/RowNum.Rd @@ -1,15 +1,12 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/reexport.R -\docType{import} \name{RowNum} \alias{RowNum} \title{Display all observations in a table.} -\keyword{internal} +\usage{ +RowNum(within = NULL, perrow = 5, show = FALSE, label = "Row", data = NULL) +} \description{ -These objects are imported from other packages. Follow the links -below to see their documentation. - -\describe{ - \item{tables}{\code{\link[tables:AllObs]{RowNum}}} -}} - +Display all observations in a table. +} +\keyword{internal} diff --git a/man/colLabels.Rd b/man/colLabels.Rd index 8278df387..dbb6fc26a 100644 --- a/man/colLabels.Rd +++ b/man/colLabels.Rd @@ -1,15 +1,12 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/reexport.R -\docType{import} \name{colLabels} \alias{colLabels} \title{Retrieve or modify the row or column labels.} -\keyword{internal} +\usage{ +colLabels(x) +} \description{ -These objects are imported from other packages. Follow the links -below to see their documentation. - -\describe{ - \item{tables}{\code{\link[tables:labels]{colLabels}}} -}} - +Retrieve or modify the row or column labels. +} +\keyword{internal} diff --git a/man/labelSubset.Rd b/man/labelSubset.Rd index e8b0487ef..33983af65 100644 --- a/man/labelSubset.Rd +++ b/man/labelSubset.Rd @@ -1,15 +1,12 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/reexport.R -\docType{import} \name{labelSubset} \alias{labelSubset} \title{Add a label to a logical vector.} -\keyword{internal} +\usage{ +labelSubset(subset, label) +} \description{ -These objects are imported from other packages. Follow the links -below to see their documentation. - -\describe{ - \item{tables}{\code{\link[tables]{labelSubset}}} -}} - +Add a label to a logical vector. +} +\keyword{internal} diff --git a/man/rowLabels.Rd b/man/rowLabels.Rd index 9f64254ec..e2e6fb54f 100644 --- a/man/rowLabels.Rd +++ b/man/rowLabels.Rd @@ -1,15 +1,12 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/reexport.R -\docType{import} \name{rowLabels} \alias{rowLabels} \title{Retrieve or modify the row or column labels.} -\keyword{internal} +\usage{ +rowLabels(x) +} \description{ -These objects are imported from other packages. Follow the links -below to see their documentation. - -\describe{ - \item{tables}{\code{\link[tables:labels]{rowLabels}}} -}} - +Retrieve or modify the row or column labels. +} +\keyword{internal}