tern 0.9.8
Enhancements
- Refactored
count_abnormal(),count_abnormal_by_baseline(),count_abnormal_by_marked(),count_abnormal_by_worst_grade(),count_abnormal_lab_worsen_by_baseline(),count_cumulative(),count_missed_doses(),coxph_pairwise(),estimate_multinomial_rsp(),estimate_proportion(),estimate_proportion_diff(),estimate_odds_ratio(),summarize_ancova(),summarize_glm_count(),summarize_num_patients(),surv_timepoint(), andtest_proportion_diff()to work withoutmake_afun(). - Refactored
afun_riskdiff(),count_occurrences(),count_occurrences_by_grade(),count_patients_with_event(),count_patients_with_flags(),count_values(),estimate_incidence_rate(),h_tab_one_biomarker(),summarize_change(),summarize_colvars(),summarize_patients_exposure_in_cols(),survival_time(),tabulate_rsp_subgroups(),tabulate_survival_subgroups(),tabulate_rsp_biomarkers(), andtabulate_survival_biomarkers()to align with new analysis function style. - Added
geom_sdandgeom_mean_sdtos_summary()as default available statistics. - Added
denomparameter toestimate_proportion(). - Added
weights_emmeansargument tosummarize_ancova().
Bug Fixes
- Fixed bug in
a_count_patients_with_flags()preventing select custom label/indentation formats from being applied. - Fixed bug in
tabulate_rsp_subgroups()andtabulate_survival_subgroups()preventing thepctoption from having an effect when adding a risk difference column. - Fixed bug with the order of
.statswhen adding custom statistical functions. - Fixed bug with multiple custom functions not being represented correctly as a list of output stats.
Miscellaneous
- Began deprecation of the unused
table_namesargument tocount_abnormal_lab_worsen_by_baseline(). - Began deprecation of the unused
h_split_param()function. - Began deprecation of the unused
label_allparameter totabulate_rsp_subgroups(), with redirection to the same parameter inextract_rsp_subgroups(). - Began deprecation of the no longer used helper functions
h_tab_one_biomarker(),h_tab_rsp_one_biomarker(), andh_tab_surv_one_biomarker(). - Updated documentation to remove suggestions to use
make_afun(). - Added warnings for
geom_meanstatistical output. - Moved helper functions
h_tab_rsp_one_biomarker()andh_tab_surv_one_biomarker()intoh_biomarkers_subgroups.R. - Reorganized the utility documentation related to factors (
utils_factor.R) into a single file. - Converted
as_factor_keep_attributes()to an exported function. - Removed internal function
ungroup_stats()and replaced its usage with theget_*_from_stats()functions. - Removed
s_count_nonmissing()as it is a non-repeated small and internal function.
tern 0.9.7
CRAN release: 2025-01-17
Enhancements
- Added the
denomparameter tos_count_cumulative(),s_count_missed_doses(), ands_count_occurrences_by_grade(). - Added
"N_row"as an optional input todenomins_count_occurrences(). - Added
rel_height_plotparameter tog_lineplot()to control the line plot height relative to annotation table height. - Added
as_listparameter tog_lineplot()to allow users to return the line plot and annotation table elements as a list instead of stacked for more complex customization. - Added vignette “Understanding
ternfunctions” for future reference. - Added to
analyze_vars()statistical names that are used byrtables::as_result_df(). - Added the possibility to integrate custom statistical functions to default ones in
analyze_vars(). - Refactored
analyze_vars()anda_summary()to take all options from?rtables::additional_fun_params. - Refactored
summarize_change()andcount_values()to work withoutmake_afun(). - Refactored
a_count_occurrences_by_grade(),a_count_patients_with_event(), anda_count_patients_with_flags()to no longer usemake_afun(). - Refactored
get_labels_from_stats()to use a named list of levels for each statistic instead of row names. - Updated the
table_font_sizeparameter ofg_lineplot()to control the size of all text in the annotation table, including labels. - Merged
compare_vars()intoanalyze_vars()as overlap was significant.
Bug Fixes
- Fixed bug in
a_summary()causing non-uniquerow_namevalues to occur when multiple statistics are selected for count variables.
Miscellaneous
- Reverted deprecation of quick get functions
summary_formats()andsummary_labels(). Added disclaimer about underlying use ofget_stats. - Corrected handling of extra arguments and
NAforsummarize_change(). - Removed
count_fraction_fixed_dpexception by assigning it to the result ofcount_fractionwith a different format output.
tern 0.9.6
CRAN release: 2024-09-24
Enhancements
- Added
median_ci_3dtos_summarywhich includes estimate and confidence interval in one statistic. - Added
median_ci_3d,quantiles_lowerandquantiles_uppertos_surv_timewhich includes estimate and confidence interval in one statistic. - Added
hr_ci_3dtos_coxph_pairwisewhich includes estimate and confidence interval in one statistic. - Added
event_free_rate_3dtos_surv_timepointwhich includes estimate and confidence interval in one statistic. - Added
rate_diff_ci_3dtos_surv_timepoint_diffwhich includes estimate and confidence interval in one statistic. - Added
errorbar_widthandlinetypeparameters tog_lineplot. - Added the
.formatsargument totabulate_rsp_subgroupsandtabulate_survival_subgroupsto allow users to specify formats. - Added the
riskdiffargument totabulate_rsp_subgroupsandtabulate_survival_subgroupsto allow users to add a risk difference table column, and functioncontrol_riskdiffto specify settings for the risk difference column. - Added warning to
tabulate_rsp_subgroupswhenpvalstatistic is selected butdfhas not been correctly generated to add p-values to the output table. - Added
n_ratestatistic as a non-default option toestimate_incidence_ratewhich returns both number of events observed and estimated incidence rate. - Added
n_uniquestatistic as a non-default option toestimate_incidence_ratewhich returns total number of patients with at least one event observed. - Refactored
estimate_incidence_rateto work as both an analyze function and a summarize function, controlled by the addedsummarizeparameter. Whensummarize = TRUE, labels can be fine-tuned via the newlabel_fmtargument to the same function. - Added
fractionstatistic to theanalyze_var_countmethod group. - Improved
summarize_glm_count()documentation and all its associated functions to better describe the results and the functions’ purpose. - Added
methodargument tos_odds_ratio()andestimate_odds_ratio()to control whether exact or approximate conditional likelihood calculations are used.
Bug Fixes
- Added defaults for
d_count_cumulativeparameters as described in the documentation. - Fixed a bug of empty levels on
g_lineplotx-axis were not shown in either plots. - Fixed a bug in
a_surv_timethat threw an error when split only has"is_event". - Fixed disappearing line in
g_lineplotwhen using only one group or strata level. - Fixed defaults for formats and labels in
get_formats_from_statsandget_labels_from_stats. - Fixed bug for linear scaling factor (
scaleparameter) being applied to response but not to rate inh_glm_countwhile all distributions have logarithmic link function. - Fixed bug in
decorate_grobthat did not handle well empty strings orNULLvalues for title and footers. - Fixed bug in
g_kmthat caused an error when multiple records in the data had estimates at max time. - Fixed issue with wrong wrapping due to different
\nand vector behavior that did not cope well withsplit_string().
Miscellaneous
- Began deprecation of the confusing functions
summary_formatsandsummary_labels. - Enhanced general descriptions of analyze and summarize functions throughout package documentation.
- Finalized deprecation of the
strataandcohort_idarguments tog_lineplot. - Moved incidence rate helper functions into a separate
h_incidence_rate.Rfile.
tern 0.9.5
CRAN release: 2024-06-21
Enhancements
- Added
facet_vartog_lineplotto allow plot faceting by a factor variable. - Added examples and tests for
label_allparameter toextract_survival_biomarkersandextract_survival_subgroups. - Added the
xticks,xlim, andylimarguments tog_lineplotto allow for customization of the x and y axes. - Updated
g_lineplotlegend to follow factor levels set by users.
tern 0.9.4
CRAN release: 2024-04-17
New Features
- Added
h_glm_negbintoh_glm_countto enable count data analysis using a negative binomial model. - Added argument
grade_groups_onlytocount_occurrences_by_gradeto allow users to only display rows for specified grade groups. - Added internal function
df2ggthat convertsdata.frameobjects toggplotobjects. - Added functions
control_surv_med_annotandcontrol_coxph_annotto configureg_kmannotation table sizes/positions. - Refactored
g_kmto output aggplotobject instead of agrobobject. - Refactored
g_forestto output aggplotobject instead of agrobobject.
Enhancements
- Default format for mean p-values (
mean_pval) updated from"xx.xx"to"x.xxxx | (<0.0001)".
Bug Fixes
- Fixed nested column split label overlay issue in
rtable2ggto clean up appearance of text labels. - Fixed bug in
s_ancovacausing incorrect difference calculations for arm variables with irregular levels. - Fixed bug in
format_count_fraction_fixed_dpthat did not have the same print when the fraction was 1 (100%). - Fixed bug in
g_lineplotcausing default labels not to update according to specifiedcontrolsettings. - Fixed bug causing an error when automatic value formatting was applied to
NAvalues.
Miscellaneous
- Added function
expect_snapshot_ggplotto test setup file to process plot snapshot tests and allow plot dimensions to be set. - Adapted to argument renames introduced in
ggplot23.5.0. - Renamed
individual_patient_plot.Rtog_ipp.R. - Removed all instances of deprecated parameters
time_unit_input,time_unit_output,na_levelandindent_mod. - Removed deprecated functions
summarize_vars,control_summarize_vars,a_compare,create_afun_summary,create_afun_compare, andsummary_custom. - Removed
vdiffrpackage from Suggests in DESCRIPTION file. - Began deprecation of the named element
strat, to be renamed tostrata, within thevariablesargument toh_rsp_to_logistic_variables,h_logistic_mult_cont_df,h_odds_ratio_subgroups_df,h_coxreg_mult_cont_df,h_coxph_subgroups_df,h_tbl_coxph_pairwise,extract_rsp_biomarkers,extract_rsp_subgroups,extract_survival_biomarkers, andextract_survival_subgroups. - Began deprecation of the
stratargument tos_coxph_pairwiseand replaced it with thestrataargument. - Began deprecation of the
forest_grob,forest_dot_line,forest_viewport,vp_forest_table_part, andgrid.forestfunctions. - Began deprecation of no longer used Kaplan-Meier helper functions
h_ggkm,h_decompose_gg,h_km_layout,h_grob_tbl_at_risk,h_grob_median_surv,h_grob_y_annot, andh_grob_coxph. - Began deprecation of
grob/gridrelated functionsstack_grobs,arrange_grobs, anddraw_grobwhich are no longer used intern.
tern 0.9.3
CRAN release: 2023-12-08
New Features
- Added
ref_group_positionfunction to place the reference group facet last, first or at a certain position. - Added
keep_level_ordersplit function to retain original order of levels in a split. - Added
level_ordersplit function to reorder manually the levels. - Added function
get_indents_from_statsto format and return indent modifiers for a given set of statistics. - Added internal utility function
apply_auto_formattingto check for"auto"formats and replace them with implementation offormat_autoin analyze functions. - Added utility function
labels_use_controlto modify labels with control specifications. - Added list containing default statistics for each method group,
tern_default_stats. - Added summarize function version of
count_occurrencesanalyze function,summarize_occurrences. - Added referential footnotes to
surv_timefor censored range observations, controlled via theref_fn_censorparameter. - Added helper function
h_adlb_abnormal_by_worst_gradeto prepare ADLB data to use as input incount_abnormal_by_worst_grade. - Added
s_bland_altmanfunction to assess agreement between two numerical vectors. - Added function
rtable2ggthat convertsrtableobjects toggplotobjects. - Added helper function to set default
na_strglobally withset_default_na_str()and addeddefault_na_str()for all interested functions.
Enhancements
- Added
ref_group_coxphparameter tog_kmto specify the reference group used for pairwise Cox-PH calculations whenannot_coxph = TRUE. - Added
annot_coxph_ref_lblsparameter tog_kmto enable printing the reference group in table labels whenannot_coxph = TRUE. - Added
x_labparameter tog_lineplotto customize x-axis label. - Remove 25% padding of y-axis in
g_lineplot. - Added support for creating multiple risk difference columns, each comparing to a single comparison group. Multiple comparison groups can be specified as a vector via the
arm_yargument. - Allowed numeric vector as
count_byinput inanalyze_num_patientsandsummarize_num_patients. - Aligned plot and table vertically in
g_lineplot.
tern 0.9.2
New Features
- Added the
na_strargument toanalyze&summarize_row_groupswrapper functionscount_abnormal,count_abnormal_by_baseline,count_abnormal_by_marked,count_abnormal_by_worst_grade,count_abnormal_lab_worsen_by_baseline,count_cumulative,count_missed_doses,count_occurrences,count_occurrences_by_grade,summarize_occurrences_by_grade,summarize_patients_events_in_cols,count_patients_with_event,count_patients_with_flags,count_values,estimate_multinomial_response,estimate_proportion,h_tab_one_biomarker,estimate_incidence_rate,logistic_summary_by_flag,estimate_odds_ratio,estimate_proportion_diff,test_proportion_diff,summarize_ancova,summarize_change,summarize_glm_count,summarize_num_patients,analyze_num_patients,summarize_patients_exposure_in_cols,coxph_pairwise,tabulate_survival_subgroups,surv_time, andsurv_timepoint.
Enhancements
- Added formatting function
format_count_fraction_lt10for formattingcount_fractionwith special consideration when count is less than 10. - Updated
s_summary.logicaloutput forcount_fractionwhen denominator is zero to display asNAinstead of0in tables. - Updated
analyze_vars_in_colsto allow character input to indicate whether nominal time point is post-dose or pre-dose when applying the 1/3 imputation rule.
Miscellaneous
- Began deprecation of
na_levelargument ins_count_abnormal_by_baseline,a_summary,analyze_vars,analyze_vars_in_cols,compare_vars,h_map_for_count_abnormal,h_stack_by_baskets,summarize_colvars,a_coxreg, andsummarize_coxregand replaced it with thena_strargument. -
strataandcohort_idparameters renamed togroup_varandsubject_varrespectively ing_lineplotandcontrol_lineplot_vars.
tern 0.9.1
New Features
- Added
imputation_rulefunction to apply imputation rule to data. - Added new format function
format_sigfigto allow for numeric value formatting by a specified number of significant figures. - Added vectors containing default statistic formats and labels as
tern_default_formatsandtern_default_labels, respectively. - Added function
get_statsto return methods from given statistical method groups. - Added function
get_formats_from_statsto return formats andget_labels_from_statsto return labels for a given set of statistics. - Added
"auto"option for.formats. It usesformat_autoto determine automatically the number of digits. - Added
titleargument toh_grob_tbl_at_riskandannot_at_risk_titleargument tog_kmandh_km_layoutwhich allows user to add “Patients at Risk” title to Kaplan-Meier at risk annotation table.
Enhancements
- Refactored
tabulate_rsp_subgroupsto pass sanitation checks by preventing creation of degenerate subtables. - Updated
analyze_vars_in_colsto use caching, allow implementation of imputation rule via theimp_ruleargument, and allow user to specify cell alignment via the.alignsargument. - Updated
add_rowcountsto allow addition of row counts fromalt_counts_dfusing thealt_countsargument. - Added
gpargument tog_forestto control graphical parameters such as font size.
Miscellaneous
- Grouped functions relating to valid method names and their default formats and labels into new source file
utils_defaults_handling.R. - Started deprecation of
summary_custom()anda_summary()as aS3method. - Renamed statistical method for
p-valuein the discrete case topval_counts. - Removed
a_summary_internal()in favor of only one maina_summary().
tern 0.9.0
CRAN release: 2023-09-01
New Features
- Added
stat_propdiff_cifunction to calculate proportion/risk difference and CI. - Added risk difference column functionality via the
riskdiffargument to functionscount_occurrences,count_occurrences_by_grade,count_patients_with_event,count_patients_with_flags,analyze_num_patients, andsummarize_num_patients.
Enhancements
- Refactored the function
a_summaryto no longer use the helper functioncreate_afun_summary. - Refactored functions
summarize_varsandcompare_varsto use the refactoreda_summaryfunction. - Created new internal helper functions
ungroup_statsto ungroup statistics calculated for factor variables, anda_summary_internalto perform calculations fora_summary.
Bug Fixes
- Fixed bug in
s_count_occurrences_by_gradeso that “missing” grade always appears as the final level. - Fixed bug in
analyze_vars_in_colswhen categorical data was used. - Fixed bug in
s_count_occurrences_by_gradeso that levels are not relabeled when reordering to account for “missing” grades.
tern 0.8.5
Enhancements
- Added
ylimargument tog_kmto allow the user to set custom limits for the y-axis. - Added assertion to
g_kmwhich checks whether there is one arm present in the data whenannot_coxphis true. - Added
flag_labelsargument tos_count_patients_with_flagsto enable more label handling options incount_patients_by_flags. - Added the
nestedargument toanalyzewrapper functionscount_abnormal,count_abnormal_by_baseline,count_abnormal_by_marked,count_abnormal_by_worst_grade,count_abnormal_lab_worsen_by_baseline,count_cumulative,count_missed_doses,count_occurrences,count_occurrences_by_grade,count_patients_with_event,count_patients_with_flags,count_values,estimate_multinomial_response,estimate_proportion,estimate_incidence_rate,estimate_odds_ratio,estimate_proportion_diff,test_proportion_diff,summarize_ancova,summarize_change,summarize_glm_count,analyze_num_patients,coxph_pairwise,surv_time, andsurv_timepoint.
tern 0.8.4
CRAN release: 2023-06-27
Enhancements
- Added method for
characterclass toh_coxreg_inter_effectenablingcharactercovariates insummarize_coxreg.
Miscellaneous
- Began deprecation of
time_unit_inputandtime_unit_outputarguments and replaced them with theinput_time_unitandnum_pt_year, respectively, incontrol_incidence_rate. - Removed deprecated
pairwisefunction. - Deprecated
a_compareand replaced it witha_summarywith argumentcompare = TRUE. - Deprecated helper functions
create_afun_summaryandcreate_afun_comparewhich are no longer used bya_summaryanda_comparerespectively.
tern 0.8.3
CRAN release: 2023-06-19
Enhancements
- Added explicit zero counts to
g_kmplot “at risk” annotation tables. - Added a flag for total level split in
analyze_patients_exposure_in_cols. - Implemented
.indent_modsargument in functionsh_tab_one_biomarker,h_tab_rsp_one_biomarker,h_tab_surv_one_biomarker,summarize_logistic,logistic_summary_by_flag,tabulate_rsp_biomarkers,a_coxreg,summarize_coxreg,tabulate_survival_biomarkers,surv_time,surv_timepoint, andcfun_by_flag. - Updated
summarize_coxregto print covariates in data rows for univariate Cox regression with no interactions and content rows otherwise. - Removed “baseline status” text from
d_count_abnormal_by_baselinelabels. - Improved default sizing of annotation tables in
g_kmand added dynamic scaling of thesurv_medandcoxphannotation tables, with customization via thewidth_annotsargument.
Bug Fixes
- Fixed bug in
split_text_grobpreventing titles and footnotes from being properly formatted and printed bydecorate_grob. - Fixed bug in
g_lineplotpreventing the addition of lines to the plot when midpoint statistic calculations result inNAvalue(s). - Fixed
tern:::tidy.glmformals to respectbroom:::tidy.defaultformals.
Miscellaneous
- Updated
READMEto include installation instructions for CRAN. - Remove examples for unexported functions.
- Export functions
has_count_in_cols,has_counts_difference,combine_counts,h_tab_rsp_one_biomarker,arrange_grobs,a_count_patients_sum_exposure,a_coxreg,groups_list_to_df,forest_viewport. - Updated
READMEto include installation instructions for CRAN. - Began deprecation of
indent_modargument and replaced it with the.indent_modsargument insummarize_num_patientsandanalyze_num_patients.
tern 0.8.2
Breaking Changes
- Refactored
s_coxregandsummarize_coxregto work with new analysis functiona_coxreg.
Enhancements
- Added
section_divandna_levelarguments tosummarize_vars. - Added
median_rangeas a numeric variable statistic option forsummarize_vars. - Corrected ordering of factor levels by
d_onco_rsp_label. - Added new “Analyze Functions”, “Summarize Functions”, and “Analyze Functions on Columns” overview pages.
- Consolidated all KM plot documentation within the
g_kmfunction. - Added
a_count_patients_sum_exposureforsummarize_patients_exposure_in_colsand new analyze functionanalyze_patients_exposure_in_cols. - Added more informative error when the user selects an invalid method for unstratified analyses in
s_proportion_diff. - Updated
s_summaryands_compareto allowNAvalues in input variables. For factor variables withNAs, ifna.rm = FALSEan explicitNAlevel will be automatically added.na.rm = TRUEwill also consider"<Missing>"values and exclude them. - Updated purpose of
na_levelparameter ins_summaryands_compareto align with otherternfunctions. Instead of being a string to consider asNAwhen settingna.rm = TRUE, it now defines a string to print in place ofNAvalues in the output table.
Bug Fixes
- Fixed missing label for
TRTEDTMinterndatasets. - Fixed improper implementation of
na_levelargument insummarize_varspreventing it from having an effect.
Miscellaneous
- Implemented the
lubridatepackage for date variables interndatasets. - Organized
.gitignoreand.Rbuildignorefiles. - Removed deprecated
footnotesfunctions and all related files. - Started deprecation cycle for
pairwisefunction. - Moved
count_patients_with_flagsfunctions fromcount_patients_with_event.Rtocount_patients_with_flags.R.
tern 0.8.0
Enhancements
- Added
summarize_glm_countfunction to analyze count data using a linear model. - Added legend to
g_step. - Added formatting functions
format_fraction_fixed_dpandformat_count_fraction_fixed_dpwith fixed single decimal place in percentages. - Added
na_levelandlabelstrarguments tosummarize_vars_in_cols. - Added
analyze_num_patientsto include summary at the beginning that does not repeat when paginating. - Added
h_row_first_valuesfunction as a more general helper function to retrieve first values from specific rows. - Added option to remove
"(n)"suffix fromunique_countlabels fors_num_patients. - Added options to
g_kmto annotate with statistics (annot_stats) and add corresponding vertical lines (annot_stats_lines).
Bug Fixes
- Fixed bug causing incorrect ordering of numeric grade levels when missing grades are present in
s_count_occurrences_by_grade. - Refactored
summarize_vars_in_colsto work with pagination machinery. - Fixed bug to allow passing of
conf_levelargument toemmeans::contrast()ins_ancova. - Fixed bugs in
rtables_access.Rcaused by not checking for specific combinations (also the standard values that were never used) of column indices and names. - Fixed single applicable record bug in
count_abnormal_by_grade. - Fixed bug in
add_rowcountsthat caused all row count row values to count as zero. - Fixed bug in
h_col_indicescausing an error when pruning with combination columns. - Fixed bug in
test_proportion_diffmissing argument forvar_labels.
Documentation and Tests
- Added more tests to increase code coverage.
- Created separate documentation files for functions in different sections of
pkgdownreference. - Created separate
.Rfiles for logistic regression and cox regression helper functions. - Fixed table tests using
analyze_num_patientsto generate an initial summary so there is no repetition when paginating. - Updated tests to use
testthat3rd edition and replaced applicable tests with snapshot testing. - Updated
summarize_ancovaexamples to useirisdataset instead ofscdadata. - Created vignette which saves cached synthetic CDISC dataset files to the
data/folder and generated cached synthetic datasets. - Updated all examples/tests to use datasets from the
data/folder instead ofscdadatasets. - Removed all template tests from
tern. These tests are in internal reposcda.test.
Miscellaneous
- Renamed
summarize_vars_in_colstoanalyze_vars_in_colsto reflect the appropriateanalyzelogic. - Removed redundant
summary_in_colshelper functions. - Exported function
format_xx. - Replaced deprecated
ggplot2functions/arguments to fix warnings. - Replaced deprecated function
forcats::fct_explicit_nawithforcats::fct_na_value_to_level. - Removed deprecated
wrap_textfunction and related files. - Started deprecation cycle for
footnotesfunctions.
tern 0.7.10
New Features
- Added stratified Newcombe and stratified Wilson statistics to
estimate_proportionandestimate_proportion_diffwith relative tests. - Added
stat_mean_pval, a new summary statistic to calculate the p-value of the mean. - Added statistic
mean_se(mean with standard error) forsummarize_variablesand related functions. - Introduced again
Rdpackfor references.
Enhancements
- Redesign of data handling in tests by removing repetitive data loads and library calls.
- Added
DescTools::BinomDiffCIfunction withintern. - Added new parameter to
summarize_logisticto specify which pivoted value to use during analysis. - Updated
s_coxph_pairwiseto generate log-rank p-value using original log-rank test instead of Cox Proportional-Hazards Model. - Implemented
nestcolorin all examples by adaptingg_km,g_ipp,g_waterfall,g_step,g_lineplot, andg_forest. - Added parameters
interaction_yandinteraction_itemin ANCOVA to make the interaction calculations available. - Added new parameter
footnotesto add footnotes tog_km.
Migration from assertthat to checkmate
- Implemented
checkmate::assert_vector,checkmate::assert_set_equal, andcheckmate::assert_intto check vector type, length, and values. - Replaced with standard assertions from
checkmatethe following functions:all_elements_in_ref,is_df_with_nlevels_factor,is_df_with_no_na_level,is_proportion_vector,is_quantiles_vector,is_character_or_factor,is_nonnegative_count,is_valid_character,assert_character_or_factor,assert_equal_lengthandhas_tabletree_colnames. - Modified
is_proportion,is_equal_length,is_df_with_no_na_level,is_df_with_nlevels_factor,is_variables,is_df_with_variables,is_df_with_factors,is_valid_factorto use assertion logic. - Added more verbose warnings from
as_factor_keep_attributes. - Made
assert_df_with_factorsandassert_proportion_valueinternal functions. - Renamed
assertthat.Randtest-assertthat.Rtoutils_checkmate.Randtest-utils_checkmate.R.
Documentation and NAMESPACE Polishing
- Added stable badges for:
-
count_abnormal_by_marked(reference toabnormal_by_marked),count_abnormal_lab_worsen_by_baselineandh_adlb_worsen(reference toabnormal_by_worst_grade_worsen_from_baseline),count_abnormal_by_worst_grade(reference toabnormal_by_worst_grade),to_string_matrix,tidy.summary.coxph,tidy.step,surv_timepoint, (reference tosurvival_timepoint),surv_time(reference tosurvival_time),coxph_pairwise(reference tosurvival_coxph_pairwise),extract_survival_subgroupsandtabulate_survival_subgroups(reference tosurvival_duration_subgroups),extract_survival_biomarkersandtabulate_survival_biomarkers(reference tosurvival_biomarkers_subgroups),control_summarize_vars,s_summaryanda_summary(reference tosummarize_variables) and kept the S3 method tree. -
summarize_patients_exposure_in_cols,summarize_num_patientswiths_num_patients,s_num_patients_content,summarize_num_patients. -
count_cumulative,count_missed_doses,count_patients_events_in_cols,summarize_colvars,summarize_change,summarize_ancova,as.rtable,color_palette,add_footnotes. - (statistical function controls)
control_coxreg,control_coxph,control_incidence_rate,control_lineplot_vars,control_surv_time,control_surv_timepoint,control_logisitic,control_step. -
stat_mean_ci,stat_median_ci,split_cols_by_groups,explicit_na,sas_na,extract_rsp_subgroups,tabulate_rsp_subgroups,extract_rsp_biomarkers,tabulate_rsp_biomarkers,keep_rows,keep_content_rows,has_count_in_any_col,has_fraction_in_cols,has_fraction_in_any_col,has_fractions_difference,test_proportion_diff,pairwise,logistic_regression,estimate_incidence_rate,control_incidence_rate(reference toincidence_rate),cut_quantile_bins,estimate_multinomial_rsp,decorate_grob_set,extreme_format,fit_rsp_step,fit_survival_step,footnotes,footnotes-set,format_count_fraction,format_fraction_threshold,formatting_functions,format_fraction,combination_function(S4 method),compare_variables(S3 method),kaplan_meier.
-
- Internal keywords added, export removed,
_pkgdown.ymlupdated, andtern:::added for tests/examples/vignettes where present for the following functions:- (chain functions, reference to
abnormal_by_marked)s_count_abnormal_by_marked,a_count_abnormal_by_marked. - (chain functions, reference to
abnormal_by_worst_grade_worsen_from_baseline)a_count_abnormal_lab_worsen_by_baseline,s_count_abnormal_lab_worsen_by_baseline. - (chain functions, reference to
abnormal_by_worst_grade)s_count_abnormal_by_worst_grade,a_count_abnormal_by_worst_grade. - (chain functions, reference to
survival_timepoint)s_surv_timepoint,s_surv_timepoint_diff,a_surv_timepoint,a_surv_timepoint_diff. - (chain functions, reference to
survival_time)s_surv_time,a_surv_time. - (chain functions, reference to
survival_coxph_pairwise)s_coxph_pairwise,a_coxph_pairwise. - (chain functions, reference to
survival_duration_subgroups)a_survival_subgroups. - (chain functions, reference to
count_cumulative)s_count_cumulative,a_count_cumulative. - (chain functions, reference to
count_missed_doses)s_count_nonmissing,s_count_missed_doses,a_count_missed_doses. - (chain functions, reference to
count_patients_events_in_cols)s_count_patients_and_multiple_events,summarize_patients_events_in_cols. - (chain functions, reference to
incidence_rate)s_incidence_rate,a_incidence_rate. - (cox regression helper)
cox_regression_inter,decorate_grob_factory,draw_grob,estimate_coef. -
summary_labels,summary_formats,s_count_patients_sum_exposure,a_change_from_baselines_change_from_baseline,a_ancova,s_ancova,arrange_grobs,as_factor_keep_attributes,combine_levels,split_text_grob,groups_list_to_df,s_cox_multivariate,is_leaf_table,a_response_subgroups,range_noinf,has_count_in_cols,has_counts_difference,prop_chisq,prop_cmh,prop_schouten,prop_fisher,s_test_proportion_diff,a_test_proportion_diff,fct_discard,fct_explicit_na_if.
- (chain functions, reference to
Bug Fixes
- Fixed retrieval method of
stats::ancovaoutput due to version inconsistency. - Fixed tests to respect the new standard print for
NAcoming fromrtables. - Fixed error in tests coming from changes in
formatters::var_labels. - Fixed
prop_difffunctions to respect success responses (TRUEvalues). - Fixed error coming from comparing factors vector to characters vector.
- Fixed empty vector exception for
cut_quantile_bins. - Fixed exception error when empty strings are present in pivoted columns (
rtablessplit functions) - Fixed bug in
s_ancovacausing an error when the first level of the arm factor is not the control arm. - Fixed bug in
s_abnormal_by_worst_gradewhen there is onePARAMlevel. - Fixed bug in
prop_diff_waldwhen selecting all responders, updated tests accordingly. - Fixed bug in
h_ancovathat caused an error when deselecting all covariates.
Miscellaneous
- Added deprecated badge to
g_mmrm. - Removed internal function calls in examples (
tern:::) and addeddontrunto internal function examples. - Removed warnings and messages to console occurring in examples and tests.
- Deprecated functions
color_paletteandh_set_nest_themein favor ofnestcolor::color_paletteandnestcolor::theme_nest, respectively. - Removed deprecated functions:
color_palette,color_palette_core,h_set_nest_theme,s_cox_univariate. - Removed deprecated MMRM functions:
fit_mmrm,g_mmrm_diagnostic,g_mmrm_lsmeans,as.rtable.mmrm,h_mmrm_fixed,h_mmrm_cov,h_mmrm_diagnostic,tidy.mmrm,s_mmrm_lsmeans,s_mmrm_lsmeans_single,summarize_lsmeans. - Renamed functions
armtostudy_armandextracttoextract_by_name. - Renamed
rtables.Rtoutils_rtables.R. - Extracted
cox_regression_interinto a separate file fromcox_regression. - Renamed
estimate_incidence_rate.Rtoincidence_rate.Rto match the documentation grouping name. - Extracted
control_incidence_rateinto a separate file because it produces a separate documentation file. - Added
@mdand removed@orderfromincidence_rate.R. Modified examples accordingly. - Removed hyperlink from
prop_schoutenfunction documentation. - Exported
draw_grobfunction.
tern 0.7.8
Documentation and NAMESPACE polishing
- Adopting the standard of badges for
@descriptioninstead of every@descriptionInfunction. Corrected accordinglysummarize_variables_in_cols - Added stable badge for
g_lineplot,g_step,g_waterfall,cox_regression,score_occurrences,add_rowcounts,odds_ratio,count_occurrences,count_occurrences_by_grade,explicit_na,df_explicit_na,count_patients_with_event,decorate_grob,combine_groups,append_varlabels,univariate,stack_grobs,count_abnormal(reference toabnormal),count_abnormal_by_baseline(reference toabnormal_by_baseline). - Internal keywords added, export removed,
_pkgdown.ymlpolished andtern:::for tests, examples, and vignettes when present for the following functions:- (helper functions)
h_format_row,h_map_for_count_abnormal - (utils functions)
make_names,month2day,day2monthempty_vector_if_na,aesi_label,n_available,format_xx,arm. -
count_values_funs,prop_difference,combine_counts. - (chain functions)
s_count_abnormal,a_count_abnormal. - (chain functions)
s_count_abnormal_by_baseline,a_count_abnormal_by_baseline,d_count_abnormal_by_baseline.
- (helper functions)
- Deprecated
s_cox_univariatefunction has now deprecated badge.
Enhancements
- Enhanced
g_lineplotwith table to automatically scale the table height and return aggplotobject. - Enhanced
g_ippwith caption argument and adjust the position. - Enhanced
prop_diff,ternfunction and related functions to be able to apply a continuity correction in the Newcombe method. - Enhanced
summarize_numeric_in_columnsandsummarize_variablesto allow factor/character summary and to be able to summarize the number ofBLQsinAVALCfromADPCdataset. - Updated order of summarize variables stats in manual for order consistency.
- Added a
sumoption tosummarize_variables. - Use consistent color palette for plotting (
streamby default). - Enhanced
h_pkparam_sortfunction with argumentkey_varto allow data with different column names.
Miscellaneous
- Updated
test-table_aet02.Rvariant 12. - Changed the
scdadata version to ‘2022-02-28’. - Added a template to the
pkgdownsite. - Removed package dependencies of
grDevices,stringr, andviridisLite. - Renaming
summarize_numeric_in_columnstosummarize_variables_in_columns. - Renaming
summarize_vars_numeric_in_colstosummarize_vars_in_cols. - Fixed a bug where points on the
g_lineplotplot were not connected when missing values. - Updated the package authors.
tern 0.7.7
New features
- Added
h_pkparam_sortto orderPK PARAMvalue based on the order of the dataset generated byd_pkparam(). - Added
d_pkparamto generate PK parameter map for sorting.
tern 0.7.6
New features
- Added
h_map_for_count_abnormalto create the map used intrim_levels_to_mapsplit function by calling this helper function. It supports two methods: one with all observed mapping, one with at least low limit above zero and at least one non missing high limit. - Added
s_summary_numeric_in_colsandsummarize_vars_numeric_in_colsfunctions to generate summary statistics in columns, mainly used for PK datasets. - Added five statistics to
s_summary.numericto use ins_summary_numeric_in_cols.
Enhancements
- Enhanced functions
tabulate_survival_subgroupsandtabulate_rsp_subgroups(Survival Duration and Best Response analyses) to calculateN-s based on the records considered to create the model. - Enhanced the function
estimate_proportionand related functions to be able to apply a continuity correction in the Wilson method. - Refactored
count_abnormal_by_markedand related statistics and formatting functions to use a more efficient layout with.spl_contextargument used for determining denominators and withtrim_levels_to_mapsplit function undersplit_rows_byto show the desired levels in the table. This is a breaking change. - Refactored
count_abnormal_by_worst_gradeand related statistics and formatting functions to use a more efficient layout with.spl_contextargument used for determining denominators and withtrim_levels_to_mapsplit function undersplit_rows_byto show the desired levels in the table. This is a breaking change. - Refactored
count_abnormalfunction and related statistics and formatting functions to use a more efficient layout withtrim_levels_to_mapsplit function undersplit_rows_byto show the desired levels in the table. Also updatedabnormalargument to be able to consider more than one level for each direction. This is a breaking change. - Enhanced the function
estimate_incidence_rateand related functions to consider the week as time unit for data input.
tern 0.7.5
New features
- Added functions to estimate continuous biomarker effects across subgroups for survival and binary response endpoints, used to produce corresponding forest plots, see
survival_biomarkers_subgroupsandresponse_biomarkers_subgroups. - Added
g_lineplotplot function, including newh_format_rowhelper function andcontrol_lineplot_varsfunction. Removedg_summary_by. - Added new safety helper function
h_stack_by_basketsto stack events in SMQ and/or CQ basket flag in ADAE data set.
Enhancements
- Added a couple of new statistics to
s_summary.numeric. Addednamesattribute to each element of the final list returned by thes_summary.numericfunction. Addedsummary_formatsandsummary_labelshelper functions. - Added option to also convert logical variables to factor variables in
df_explicit_na. - Refactored
h_append_grade_groupsto improve its flexibility, robustness and clearness, and to make sure the result is ordering according to the order ofgrade_groups. Also, addedremove_singleargument which controls whether the elements of one-element grade groups are in the output or removed. - Added
var_labelsandshow_labelsarguments tocount_occurrencesandcount_patients_with_flagsto allow for creation of a title row. - Added
na_levelargument tocount_abnormal_by_baseline. - Updated
h_append_grade_groupsto no longer fill-in empty grade groups with zeros.
Bug Fixes
- Fixed
prop_diff_cmhto handle edge case of no FALSE (or TRUE) responses. - Enhanced
g_mmrm_diagnosticto improve error handling when data is not amenable to the Locally Weighted Scatterplot Smoothing. - Fixes in
g_km:- Plot can now display any combination of the annotation tables for number of patients at risk, median survival time, and Cox-PH summary.
- Function will return a warning instead of an error if the
armvariable includes a single level andannot_coxph = TRUE. - Lines in the plot now start at time 0 and probability 1.
- Category labels can include the equals sign.
Miscellaneous
- Fixed
day2monthandmonth2dayto work with NA data. - Added parameters for
stat_mean_ciandstat_median_ciso that they may return different outputs. - Added functionality in
h_row_countsto handle analysis rows withNULLcells. - Updated
LICENCEandREADMEwith new package references. - Added
error_on_lint: TRUEto.lintr.
tern 0.7.4
New features
- Added new safety layout functions:
-
count_abnormal_by_markedtabulates marked laboratory abnormalities. -
summarize_patients_exposure_in_colstabulates patient counts and sum of exposure across all patients.
-
Enhancements
- Enhanced MMRM-related functions for fitting models without
armvariable. - Updated
cox_regressionto work without covariates. Also in case of interaction model summary, p-values for main effect coefficients are no longer displayed. - Descriptive statistics returned by
summarize_varsnow include quantiles.summarize_varsnow accepts the control functioncontrol_summarize_varsto specify details about confidence level for mean and median and quantile details. Thecontrolargument replacesconf_level. - Added
var_labelsandshow_labelsarguments tocount_occurrences_by_grade. - Changed
indentargument inappend_varlabelsto accept non-negative integer to represent the indent space defined by user. Previous calls with Booleanindentwill do an integer conversion and produce a warning.
Bug Fixes
- Corrected
tabulate_survival_subgroupsand related survival forest plot functions to use total number of events, instead of observations, as default for scaling the symbol sizes in the plot. (The user might still use total number of observations manually if they wish to do so.) - Helper function
h_adsl_adlb_merge_using_worst_flagwill now imputeBTOXGRfor missing visits.
tern 0.7.3
New Features
- Added Subgroup Treatment Effect Pattern (STEP) model fitting functions
fit_rsp_stepandfit_survival_step, the corresponding tidy methodtidy.stepas well as the graph functiong_step. - Added new layout function
compare_varswhich compares variables of different types between columns and produces a p-value for the comparison to the reference column. Function built on top of thesummarize_varsfunctionality. - Added utility functions:
-
cut_quantile_binscuts a numeric vector into quantile bins. -
fct_collapse_onlycollapses levels of a factor and keeps those in the order provided. -
fct_explicit_na_ifinserts explicit missings in a factor based on a condition. -
range_noinfis a kind of a wrapper function ofbase::range. It returnsc(NA, NA)instead ofc(-Inf, Inf)for zero-length data.
-
Enhancements
- Cox regression via
fit_coxreg_univarandfit_coxreg_multivaris now also possible without treatment arm. In the univariate case this means that it fits separate univariate models for the provided covariates and tabulation of corresponding effect estimates can later occur. - Added
fractionin result returned bys_count_occurrences. It contains a list of numerators and denominators with one element per occurrence. - Updated
sum_num_patientsandcount_occurrencesfor the resultuniqueandcount_fractionto return (0, 0) when input is empty. - Added a new argument
groups_liststoextract_survival_subgroups,extract_rsp_subgroupsand associated helper functions which allows to group factor levels of subgroup variables into manually defined groups, enhancing the flexibility of the resulting forest graphs. - Forest graph function
g_forestnow extracts default arguments from attributes of the input table produced bytabulate_rsp_subgroupsandtabulate_survival_subgroupsso that the user does not have to do this manually anymore. - In
g_km:- Remove arm variable name from arm labels in plot legend and annotation tables.
- Show symbol used to mark censored cases and match order of arm variable factor levels in the legend.
- Display hazard ratio and its confidence interval to two decimal places.
- Updated default position of hazard ratio table to stay on the left bottom corner but above x-axis.
- Use arm value as strata name in when treatment arm variable has a single level.
- Updated
s_surv_timefunction to use a newly created functionrange_noinfinstead ofbase::range. - New argument
no_fillin_visitsadded toh_adsl_adlb_merge_using_worst_flagto specify excluded visits from the post-baseline worst toxicity grade output. Improvedh_adsl_adlb_merge_using_worst_flagto include variables shared betweenadslandadlb, along withPARAM,PARAMCD,ATOXGR,BTOXGRand optionallyAVISIT,AVISITNwhenby_visit = TRUE. Prior output containedUSUBJID,ARMCD,PARAMCD,ATOXGR, andBTOXGR.
Bug Fixes
- Fix bug in
s_surv_timepointfor cases when there are zero patients at risk. - Modified
stat_median_cifunction so that when passing empty var with empty name, norow names contain missing valueserror would show.
Miscellaneous
- Deprecated
s_cox_univariatefunction, usefit_coxreg_univarfunction instead. - Updated default formats of
hrandhr_ciina_coxph_pairwiseand median ins_surv_timeto align with STREAM. - Updated the pre-processing code in the files
test-table_ttet01.Randtest-table_dort01.Rto make sure the analysis variableEVNT1has both levels of the factor defined. - Improved error message when number of levels in a factor variable in a data frame is not as expected.
tern 0.7.1
- New argument
position_surv_medadded tog_kmto move position of the annotation table with median survival times. - Fixed bug in
g_kmrelated to the ignored argumentspchandsizewhich were not passed on to helper functionh_ggkm. - Updated
xticksandmax_timearguments ing_kmfor greater functionality.max_timeadded as an argument inh_xticksto allow this. - Fixed bug in
prop_diff_cmhthat led toNaNweighted proportion difference estimates and missing confidence intervals. Before this change, when including no patients from one treatment arm for at least one stratum the estimation did not lead to numeric results. - Fixed bug in
prop_cmhgiving an error in case of at least one stratum containing less than two observations. - New argument
n_eventsadded toestimate_incidence_rate. - New argument
denomadded tocount_occurrences. - New arguments
yvalandci_ribbonadded tog_km. - Add new individual patient plot function
g_ippalong with helpersh_g_ippandh_set_nest_theme. - Fixed bug in
count_patients_with_events, now shows zero counts without percentage. - Fixed bug in
get_mmrm_lsmeanswhich did not allow MMRM analysis of more than 3000 observations. - Updated
stat_mean_ciandstat_median_cito handle edge cases with number of elements in input series equal to 1. For such cases,NA_real_is now returned, instead ofNAor+/-Inffor confidence interval (CI) estimates. - Rename
n_limargument ofstat_mean_citon_minto better reflect its desired meaning.
tern 0.7.0
This version of tern introduces a major rewriting of tern due to the change to layout based tabulation in rtables. tern now does not build tables directly anymore, instead it provides analysis functions to build tables, see the examples. * Counting patients with abnormal values post-baseline with count_abnormal. * Counting patients with graded abnormal values with count_abnormal_by_worst_grade. * Counting patients with abnormal values by baseline status with count_abnormal_by_baseline. * Counting patients with missed doses with s_count_missed_doses and count_missed_doses. * Counting patients with event flags with count_patients_with_event and count_patients_with_flags. * Summarizing variables with summarize_vars (supports numeric, factor, character and logical variables). Note that factors need to have NAs converted to na_level before use. * Summarizing change from baseline with summarize_change. * Summarizing variables in columns with summarize_colvars. * Estimating difference for responder proportions with estimate_proportion_diff. * Estimating difference for Odds Ratio with estimate_odds_ratio. * Testing the difference in responder proportions with test_proportion_diff. * Estimating the responder proportion for the level of a factor with estimate_multinomial_response. * Fitting and tabulating the results of Cox regressions with fit_coxreg_univar, fit_coxreg_multivar and summarize_coxreg, respectively. * Pruning occurrence tables (or tables with counts and fractions) with flexible rules, see ?prune_occurrences for details. * Sorting occurrence tables using different options, see ?score_occurrences for details. * Fitting and tabulating MMRM models with fit_mmrm and as.rtable and summarize_lsmeans, see ?tabulate_mmrm for details. * Counting the number of unique and non-unique patients with summarize_num_patients. * Counting occurrences with count_occurrences. * Counting occurrences by grade with summarize_occurrences_by_grade and count_occurrences_by_grade. * Counting patients and events in columns with summarize_patients_events_in_cols. * Tabulating the binary outcome response by subgroup with extract_rsp_subgroups and tabulate_rsp_subgroups. * Tabulating the survival duration by subgroup with extract_survival_subgroups and tabulate_survival_subgroups.
tern 0.6.8
- Improved handling of missing data in aggregation functions:
a_mean_sd,a_median,a_n_true_and_freq,a_count,a_q1q3,a_iqr,a_range. - New default p-value method in
s_test_proportion_diff: Chi-Squared Test with Schouten Correction. - Add new function
t_contingencyfor contingency tables. - Renamed the class
splitTexttodynamicSplitTextto resolve the name conflict with the packageggpubr. - Add
rreplace_formatfor tabulation post-processing. - Add new tern function
t_ancovato create ANCOVA tables, as well as corresponding elementary table functiont_el_ancovaand summary functions_ancova. - Add new tern function
s_odds_ratioto estimate Odds Ratio of response between categories, as well as the corresponding elementary table functiont_el_odds_ratio. - Added new CI methods (
agresti-coull,jeffreys) fors_proportion. - Added new CI methods
anderson-hauckandnewcombetos_proportion_diff. - Added new p-value methods (Fisher’s Exact, Chi-Squared Test with Schouten Correction) for
s_test_proportion_diff. - The binary summary table function
t_binary_outcometakes now lists (instead of character vectors) specified by the helper functioncontrol_binary_comparisonas the argumentsstrat_analysisandunstrat_analysis. Odds Ratio estimates and CIs are now removable and included by default, similarly to the other subsections of the arm comparison analyses. Also added argumentrsp_multinomial. - Add new table function
t_el_multinomial_proportion. - Add new table function
t_abn_shift. - Add new MMRM analysis function
s_mmrm, as well as corresponding table functionst_mmrm_lsmeans,t_mmrm_cov,t_mmrm_diagnostic,t_mmrm_fixed, and plot functionsg_mmrm_lsmeans,g_mmrm_diagnostic. The results of these match SAS results (up to numeric precision). - Deprecated old MMRM functions
a_mmrmandt_mmrm(they give a deprecation warning but still work) to remove in the next release. The reason is that the results of these functions don’t match SAS results. - Fix bug in
g_kmrelated to numbers in patients at risk table to correct numbers for integer time-to-event variable inputs.
tern 0.6.7
- For functions with
row_byargument, inputs no longer require use ofnested_by. - Add
stat_mean_ciandstat_median_cifor error bars inggplot2. - Add new tern function
t_coxregas single interface for diverse cox regression types. - Add compound table for binary endpoint:
t_binary_endpointand elementary functions:t_el_proportion,t_el_proportion_diffandt_el_test_proportion_diff. The supporting summary functions added are:s_proportion,s_adj_proportion_diff,s_proportion_diffands_test_proportion_diff. - Added new tern function
t_events_patyearto create event table adjusted person-years. - Added new tern function
t_abnormalityand the elementary table functiont_el_abnormality. - Removed
grade_levelsargument fromt_events_term_grade_idfunctions. Post-processing by reordering the leaves of the table tree creates a different ordering of rows if required. Creating a helper function will occur at a later time. - Added
prune_zero_rowsargument tot_events_per_term_grade_idandt_max_grade_per_idto not show rows of all zeros as they can clutter the visualization in the Shiny app and make it slower. - Fixed position of (N=xx) in
t_summary_byoutput when summarizing numeric columns in parallel withcompare_in_header. - Rename
t_coxphtot_coxph_pairwiseto reflect the model process, add details in documentation. - Remove
test.nestdependency. - Keep column labels when splitting data into tree.
tern 0.6.5
- Change default option for denominator to be
Nint_summary. - Fix IQR bug: IQR as Q3 minus Q1.
- Add new function
t_logisticfor multi-variable logistic regression table. - Add new function
df_explicit_nato replaceNAby explicit values. - Added possibility in
t_tteto specify confidence level independent forsurvfit,coxph, andztest, see the manual. - Fixed bug in
t_rspof not showing p-value, odds ratio and CIs whenstrata_datais notNULL. - Added stratified analysis for
t_forest_rspandt_forest_tte, with footnotes ing_forest. - Added
footnotes,footnotes<-andadd_footnotes<-functions to deal with footnotes. - Added argument
conf_intfor confidence interval level tot_el_forest_rps,t_forest_rsp,t_el_forest_tte,t_forest_tte. - Added argument
col_symbol_sizetog_forestto control the relative size of symbols used in the plot. - Added
s_coxph_pairwisefunction to perform pairwise testing, used byt_tteandt_coxph. - Added methods for
t_count_truereplacingt_summary_true. - Updated
t_count_uniqueto create analysis subsets, addedt_el_count_uniquefor vectors. - Fixed bug in
t_events_term_idso that table sort order is by decreasing frequency instead of alphabetical. - Added function
color_paletteand a new nest color palette.
tern 0.6.4
- Refactored after renaming functions in
utils.nest. - Added
event_typeargument tot_events_per_term_grade_id. - Added one/two-arm t-test functions.
- Improvements in
t_summary_by. - Internal code refactoring.
tern 0.6.3
- Added
nodeS4 class to create trees:- For all related tree functions see the reference under trees.
- Removed functions:
- Moved all the label functions to
rtables. - Deleted
keysandkeys<-functions.
- Moved all the label functions to
- New helper functions:
- Exported
tabulate_pairwise. -
get_N,col_N_add_total,check_id. -
na_as_level. -
as_factor_keep_attributes. -
r_by.
- Exported
- New TLGs:
- Disposition elementary table
t_el_disposition. -
t_el_forest_tte,t_el_forest_rsp.
- Disposition elementary table
- Changed Arguments:
- All compound tables:
- Added
table_treeargument which returns anodeobject.
- Added
-
t_summary.numeric:- Added
f_numericto choose which statistics to calculate.
- Added
-
t_summary.factor:-
denominatornow also allows foromitif wanting to omit percentages.
-
-
t_summary_by:- Renamed
bytorow_by.
- Renamed
-
t_forest_rsp,t_forest_tte:- Changed functionality of
group_datausingrow_by_list. - Removed
na_omit_group.
- Changed functionality of
-
t_count_unique:- Removed
indentargument, use theindentfunction inrtables. instead
- Removed
- All compound tables:
tern 0.6.2
- Use cached data from
random.cdisc.datato speed up testing. - Added
t_summary.Datemethod. - Added
save_join.
tern 0.6.1
- Fixed colors in Kaplan-Meier Plot
- Refactor of all functions to pass
test.nesttests:- Changed
width_row.namesargument ofg_forestfunction intowidth_row_names. - Changed
censor.showargument ofg_kmfunction intocensor_show. - Changed
col.legend.titleargument ofg_waterfallfunction intocol_legend_title. - Changed
na.rmargument oft_count_uniquefunction intona_rm. - Changed
row.nameargument oft_count_uniquefunction intorow_name. - Changed
na.omit.groupargument oft_forest_rspfunction intona_omit_group. - Changed
na.omit.groupargument oft_forest_ttefunction intona_omit_group. - Changed
row.name.TRUEandrow.name.FALSEarguments oft_summary.logicalintorow_name_trueandrow_name_falserespectively. - Rename
splotTextGrobintosplit_text_grob. - Fix examples.
- Refactor of internal functions code.
- Changed
tern 0.6.0
- Removed functions
addTable,t_summarize_by_visit,t_summarize_variables. - Added
t_summary_byfunction. - Refactor of
g_kmfunction, renamedkmGrobintokmCurveGrob. - Refactor
t_events_*family of functions. - Updated examples.
tern 0.5.0.3
New TLGs
-
t_summaryand methods fordata.frame,numeric,logical,character,factor, andDateobjects. -
t_events_per_term_id,t_events_per_term_grade_id: Adverse Events & Concomitant Treatment Tables. -
t_max_grade_per_id,t_count_unique,t_events_summaryelementary tables used for the Adverse Events & Concomitant Treatment Tables. -
g_waterfall: Horizontal Waterfall Plot.
New Helper Functions
-
decorate_grob,decorate_grob_set,decorate_grob_factory,splitTextGrob. -
stack_grobs,arrange_grobs,draw_grob.
TLG changes
-
t_ttenow shows two rows with ranges for event and censored times, respectively. -
g_kmworks with one armsurvfitobjects. - In forest plot functions, added formatting to display extreme values to “>999.9”.
-
t_summarise_variablesuses nowninstead ofNas a denominator for calculating percentages for factors by default. -
t_rspnow works when all response values areTRUEorFALSE.
