Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
5ce0bdf
code modification to jjcsformats
iaugusty Sep 8, 2025
81f9adc
updates to test scripts
iaugusty Sep 8, 2025
33230be
update test snapshots
iaugusty Sep 8, 2025
22cfc2f
devtools::document()
iaugusty Sep 8, 2025
094f9fc
round_type io roundmethod
iaugusty Sep 8, 2025
32b15c6
extra test snapshot
iaugusty Sep 8, 2025
280656c
updates to some junco default formats + impacted tests
iaugusty Sep 8, 2025
29366ce
round_type should be passed to paginate_to_mpfs as well
iaugusty Sep 8, 2025
98d7774
round_type as argument to tt_to_tlgrtf
iaugusty Sep 9, 2025
5181122
[skip style] [skip vbump] Restyle files
github-actions[bot] Sep 13, 2025
9e5af1f
[skip roxygen] [skip vbump] Roxygen Man Pages Auto Update
github-actions[bot] Sep 13, 2025
3be1847
resolve test problems
iaugusty Nov 7, 2025
9dd56bd
apply review suggestions
iaugusty Nov 7, 2025
fed3c42
Merge branch 'dev' of https://github.com/johnsonandjohnson/junco into…
iaugusty Dec 2, 2025
5b59db5
[skip style] [skip vbump] Restyle files
github-actions[bot] Dec 2, 2025
3120443
[skip roxygen] [skip vbump] Roxygen Man Pages Auto Update
github-actions[bot] Dec 2, 2025
a425c77
update tests for round_type
iaugusty Dec 2, 2025
c01ecc2
document
iaugusty Dec 2, 2025
a8a7080
code update + styler
iaugusty Dec 2, 2025
f976325
[skip style] [skip vbump] Restyle files
github-actions[bot] Dec 2, 2025
213c7ce
[skip roxygen] [skip vbump] Roxygen Man Pages Auto Update
github-actions[bot] Dec 2, 2025
dded592
lintr
iaugusty Dec 2, 2025
c07351d
[skip style] [skip vbump] Restyle files
github-actions[bot] Dec 2, 2025
c8dba05
address spelling
iaugusty Dec 2, 2025
15ba038
Merge branch '70-formatting-function-round_type' of https://github.co…
iaugusty Dec 2, 2025
0b08970
[skip roxygen] [skip vbump] Roxygen Man Pages Auto Update
github-actions[bot] Dec 2, 2025
933137f
remove 1 test, covered above
iaugusty Dec 2, 2025
6f0587e
update ref to formatting functions
iaugusty Dec 2, 2025
f553161
roxygen update + test update
iaugusty Dec 2, 2025
936663d
[skip style] [skip vbump] Restyle files
github-actions[bot] Dec 2, 2025
f6f8e80
[skip roxygen] [skip vbump] Roxygen Man Pages Auto Update
github-actions[bot] Dec 2, 2025
f65e676
fix styler
iaugusty Dec 2, 2025
8165e59
[skip style] [skip vbump] Restyle files
github-actions[bot] Dec 2, 2025
ae985c7
set valid_round_type as defaults for round_type
iaugusty Dec 4, 2025
3c527a0
[skip style] [skip vbump] Restyle files
github-actions[bot] Dec 4, 2025
2c6cc02
fix: codepencies
munoztd0 Dec 4, 2025
4ad1f13
fix: lint
munoztd0 Dec 4, 2025
91a511b
fix: .rtf .Rbuildignore
munoztd0 Dec 4, 2025
fe9f7c3
116 tt to tbldf function behavior with invalid structures (#124)
munoztd0 Dec 11, 2025
767a05c
update to jjcsformat_range_fct per suggestion Joe
iaugusty Dec 11, 2025
3983300
Merge branch '70-formatting-function-round_type' of https://github.co…
iaugusty Dec 11, 2025
0117e50
Merge branch 'dev' into 70-formatting-function-round_type
munoztd0 Dec 11, 2025
621cd5a
[skip style] [skip vbump] Restyle files
github-actions[bot] Dec 11, 2025
6d012fa
add censor_char to function
iaugusty Dec 11, 2025
d78ddbf
Update R-CMD-check.yaml
munoztd0 Dec 11, 2025
a854b54
update to tt_to_tbldf and add tests
iaugusty Dec 12, 2025
5c0ecb9
in calc_one_visit only sas and iec rounding for now
iaugusty Dec 12, 2025
d88448f
Merge branch 'dev' into 70-formatting-function-round_type
munoztd0 Dec 12, 2025
45a4b47
[skip style] [skip vbump] Restyle files
github-actions[bot] Dec 12, 2025
c0a0c35
trigger checks
iaugusty Dec 12, 2025
bd78027
fix: DESCRIPTION
munoztd0 Dec 12, 2025
c5359e5
Merge remote-tracking branch 'origin/dev' into 70-formatting-function…
munoztd0 Dec 12, 2025
b45b9e2
Rework calc_one_visit, add 'support' for 'default' format to jjcsformats
gmbecker Dec 16, 2025
860424b
[skip style] [skip vbump] Restyle files
github-actions[bot] Dec 16, 2025
ddbce8a
fix: inheritParams in WORDLIST
munoztd0 Dec 17, 2025
ada5fd6
Merge remote-tracking branch 'origin/70-formatting-function-round_typ…
munoztd0 Dec 17, 2025
c9ac594
Merge branch 'dev' into 70-formatting-function-round_type
gmbecker Dec 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
# - {os: macos-latest, r: 'release'}
Comment thread
munoztd0 marked this conversation as resolved.
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'release'}

Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ programs_external/*
#IDE
.vscode/settings.json
.idea/*
temp_ilse/*

#Air
air.toml
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.3] - 2025-11-28
## [0.1.2] - 2025-12-10

### Added and Removed
- Add `a_two_tier()` analysis function
Expand All @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Fixes #102 bug inappropriate warnings from `cond_rm_facets` function
- Fix bug for not selecting NA records in `h_subset_combo()`
- Consistent `tt_to_tbldf()` function behavior with invalid structures #116


## [0.1.1] - 2025-07-28
Expand Down
18 changes: 9 additions & 9 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Authors@R: c(
person("Ezequiel", "Anokian", , "eanokia1@its.jnj.com", role = c("ctb")),
person("Renfei", "Mao", , "rmao6@its.jnj.com", role = c("ctb")),
person("Mrinal", "Das", , "mdas35@its.jnj.com", role = c("ctb")),
person("Wojciech", "Wojciak", , "wwojciak@its.jnj.com", role = c("ctb")),
person("Isaac", "Gravestock", role = "cph",
comment = "Author of included rbmi functions"),
person("Joe", "Zhu", role = "cph",
Expand All @@ -35,19 +36,14 @@ Description: Structure and formatting requirements for clinical trial table and
License: Apache License (>= 2)
URL: https://github.com/johnsonandjohnson/junco, https://johnsonandjohnson.github.io/junco/
BugReports: https://github.com/johnsonandjohnson/junco/issues
Remotes:
insightsengineering/formatters@main,
insightsengineering/rtables@main,
insightsengineering/rlistings@main,
insightsengineering/tern@main
Depends:
Depends:
R (>= 4.4),
formatters (>= 0.5.6),
formatters (>= 0.5.12),
rtables (>= 0.6.13)
Imports:
tidytlg (>= 0.1.5),
tern (>= 0.9.9),
rlistings (>= 0.2.11),
rlistings (>= 0.2.13),
checkmate (>= 2.1.0),
broom,
methods,
Expand All @@ -74,12 +70,16 @@ Suggests:
mvtnorm,
parallel,
readxl,
pharmaverseadam,
rlang,
rbmi (>= 1.3.0),
tidyr,
rlang,
rbmi (>= 1.3.0),
tidyr,
rlang,
pharmaverseadamjnj
VignetteBuilder: knitr
Config/testthat/edition: 3
Remotes:
insightsengineering/rtables@main
Additional_repositories: https://insightsengineering.r-universe.dev/
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ export(find_missing_chg_after_avisit)
export(fit_ancova)
export(fit_mmrm_j)
export(format_stats)
export(format_xx_fct)
export(get_mmrm_lsmeans)
export(get_ref_info)
export(get_titles_from_file)
Expand All @@ -60,6 +59,7 @@ export(inches_to_spaces)
export(insert_blank_line)
export(jj_complex_scorefun)
export(jjcs_num_formats)
export(jjcsformat_cnt_den_fract_fct)
export(jjcsformat_count_denom_fraction)
export(jjcsformat_count_fraction)
export(jjcsformat_fraction_count_denom)
Expand Down
5 changes: 3 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@

- Remove some unused functions (jj_uc_map, postfun_cog, postfun_eq5d, column_N, non_blank_sentinel, null_fn, unicodify
- Replace {pharmaverseadam} with {pharmaverseadamjnj}
- fix bug for not selecting NA records in `h_subset_combo()`
- update `string_to_title()` to handle factors (#26)
- Fix bug for not selecting NA records in `h_subset_combo()`
- Update `string_to_title()` to handle factors (#26)
- Consistent `tt_to_tbldf()` function behavior with invalid structures (#116)

## Other changes

Expand Down
73 changes: 23 additions & 50 deletions R/column_stats.R
Original file line number Diff line number Diff line change
@@ -1,60 +1,33 @@
calc_one_visit <- function(datvec, decimal, statnm, visit, varnm, roundmethod = c("sas", "iec"), exclude_visits,
calc_one_visit <- function(datvec, decimal, statnm, visit, varnm, round_type = valid_round_type, exclude_visits,
var_names = c("AVAL", "CHG", "BASE")) {
roundmethod <- match.arg(roundmethod)
round_type <- match.arg(round_type)
if (is.na(decimal)) {
decimal <- 0
}
if ((varnm == var_names[2] || varnm == var_names[3]) && (visit %in% exclude_visits)) {
return(NULL)
}
if (roundmethod == "sas") {
switch(statnm,
N = length(stats::na.omit(datvec)),
SE = format(
tidytlg::roundSAS(stats::sd(datvec) / sqrt(length(stats::na.omit(datvec))), decimal + 2),
nsmall = decimal + 2
),
SD = format(
tidytlg::roundSAS(stats::sd(datvec), decimal + 2),
nsmall = decimal +
2
),
Mean = format(tidytlg::roundSAS(mean(datvec), decimal + 1), nsmall = decimal + 1),
mean_sd = paste0(
format(tidytlg::roundSAS(mean(datvec), decimal + 1), nsmall = decimal + 1),
" (",
format(
tidytlg::roundSAS(stats::sd(datvec), decimal + 2),
nsmall = decimal +
2
),
")"
),
Med = format(tidytlg::roundSAS(stats::median(datvec), decimal + 1), nsmall = decimal + 1),
Min = format(tidytlg::roundSAS(min(datvec), decimal), nsmall = decimal),
Max = format(tidytlg::roundSAS(max(datvec), decimal), nsmall = decimal)
)
} else {
switch(statnm,
N = length(stats::na.omit(datvec)),
SE = format(round(stats::sd(datvec) / sqrt(length(stats::na.omit(datvec))), decimal + 2), nsmall = decimal + 2),
SD = format(round(stats::sd(datvec), decimal + 2), nsmall = decimal + 2),
Mean = format(round(mean(datvec), decimal + 1), nsmall = decimal + 1),
mean_sd = paste0(
format(round(mean(datvec), decimal + 1), nsmall = decimal + 1),
" (",
format(
round(stats::sd(datvec), decimal + 2),
nsmall = decimal +
2
),
")"
),
Med = format(round(stats::median(datvec), decimal + 1), nsmall = decimal + 1),
Min = format(round(min(datvec), decimal), nsmall = decimal),
Max = format(round(max(datvec), decimal), nsmall = decimal)
)
}

switch(statnm,
N = length(stats::na.omit(datvec)),
SE = round_fmt(stats::sd(datvec) / sqrt(length(stats::na.omit(datvec))),
decimal + 2,
round_type = round_type
),
SD = round_fmt(stats::sd(datvec), decimal + 2, round_type = round_type),
Mean = round_fmt(mean(datvec), decimal + 1,
round_type = round_type
),
mean_sd = paste0(
round_fmt(mean(datvec), decimal + 1, round_type = round_type),
" (",
round_fmt(stats::sd(datvec), decimal + 2, round_type = round_type),
")"
),
Med = round_fmt(stats::median(datvec), decimal + 1, round_type = round_type),
Min = round_fmt(min(datvec), decimal, round_type = round_type),
Max = round_fmt(max(datvec), decimal, round_type = round_type),
)
}

#' @name column_stats
Expand Down
Loading
Loading