Skip to content

Commit

Permalink
0.99.56
Browse files Browse the repository at this point in the history
  • Loading branch information
AndriSignorell committed Aug 21, 2024
1 parent 4dee319 commit c094ba7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: DescTools
Type: Package
Title: Tools for Descriptive Statistics
Version: 0.99.55.4
Date: 2024-08-19
Version: 0.99.56
Date: 2024-08-21
Authors@R: c(
person("Andri", "Signorell", email = "andri@signorell.net", role = c("aut", "cre")),
person("Ken" , "Aho", role = c("ctb")),
Expand Down
6 changes: 3 additions & 3 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ UPDATED FUNCTIONS:
* Hodges-Lehman now uses long-longs instead of integers, allowing larger vectors.
* AddMonthsYM() has been integrated in AddMonths(). Use AddMonths(as.ym(202402))
instead.
* The Desc() procedure now puts the response in columns instead in rows as up to now
in the case of two factor variables. So the resulting table is transposed compared
to before.
* The Desc() procedure now puts the response in columns instead in rows as up
to now in the case of two factor variables. So the resulting table is
transposed compared to before.
* The Desc() procedure for 2x2 tables includes a confidence interval for
the difference of proportions based on BinomDiffCI(..., method="mn").

Expand Down
11 changes: 7 additions & 4 deletions R/Desc.R
Original file line number Diff line number Diff line change
Expand Up @@ -1485,11 +1485,14 @@ calcDesc.bivar <- function(x, g, xname = NULL, gname = NULL,
}


.LineSep <- function(sep, x){
.LineSep <- function(sep, x, n=NULL){
if(is.null(n))
n <- getOption("width") - 2

# define the separator, "-------..." if not given
Coalesce(
sep, x$sep, eval(parse(text=DescToolsOptions("linesep", default = NA))),
paste(rep("-", (getOption("width") - 2)), collapse = "")
paste(rep("-", n), collapse = "")
)

}
Expand Down Expand Up @@ -2011,12 +2014,12 @@ print.Desc.table <- function(x, digits = NULL, ...) {
if ((x$verbose == "3") || (x$ttype == "t2x2")) {
if (.has_color()) {
cat(cli::col_silver(gettextf(
"\n----------\n%s %s%s conf. level\n",
"\n%s\n%s %s%s conf. level\n", .LineSep(n=10),
DescToolsOptions("footnote")[1], x$conf.level * 100, "%"
)))
} else {
cat(gettextf(
"\n----------\n%s %s%s conf. level\n",
"\n%s\n%s %s%s conf. level\n", .LineSep(n=10),
DescToolsOptions("footnote")[1], x$conf.level * 100, "%"
))
}
Expand Down

0 comments on commit c094ba7

Please sign in to comment.