formatters 0.4.0
CRAN release: 2023-03-02
- Cell values and row labels are now word-wrapped based on column widths (
widthsintoStringandcolwidthsin pagination and exporters - New “N=xx (xx%)” format support (https://github.com/insightsengineering/rtables/issues/516)
- New generic getter and setter for na-string (
obj_na_strandobj_na_str<-, migrated fromrtables) -
MatrixPrintFormclass now carries aroundhas_topleftinformation explicitly, gettermf_has_topleft - Number of header lines in a MatrixPrintForm object (
mf_nlheader) is now a computed attribute rather than a stored one,mf_nlheader<-has been removed - New
MatrixPrintFormaccessor:mpf_has_rlabelsdetermines whether the MPF$strings has a column which are label rows (i.e. no column index in originating object). -
wrap_textandwrap_stringnow accept thehardargument (defaultFALSE) indicating whether ‘hard’ word-wrapping (i.e. explicit embedding of newline characters) should be performed. -
vert_pag_indicesnow acceptsrep_colsto control how many columns act as ‘row-label-like’, as required byrlistings - Documentation of pagination algorithm greatly expanded.
- Pagination with
verbose = TRUEis now significnatly more informative - fix bug where indenting was not correct when row-labels were word wrapped (#84, #85)
- fix bug where portions of table after last section div (e.g., non-nested further analyses) were omitted (#77)
- fix bug in
mf_rinfo<-checked the new value against the wrong dimensions. - Fixed off-by-one error in basic pagination machinery
- Fix bug in position of header separator when columns have word wrapping (#68)
- Bug rendering
mf_lgroupingnon-functional has been fixed
formatters 0.3.4
-
nlinesnow accepts bothcolwidthsandmax_width, defaulting toNULLfor both -
pag_indices_inner,find_pagandvalid_pagnow accepthave_col_fnotesanddiv_heightarguments - fix bug which lead to insightsengineering/rtables#414 (
nlines("", <non-null>)threw an error - paginate related generics now accept max_width for use in ensuring pagination now takes word wrapping into account for titles and footers.
- nlines character method has changed, not takes the sum of the nlines of its elements instead of the max in the case of a vector of length > 1
- new
wrap_title_footerfunction for use on everything which implements the generic interface we design. - export new
page_dimfunction which returns values of page dims for a named type. -
tf_wrapfunctionality now breaks up words that are too large with respect to surrounding word wrapping. -
tf_wrapbehavior no longer emits a warning when breaking up ‘words’ larger thanmax_width -
tf_wrapmax_width = "auto"now sets themax_widthtosum(widths) + table_inset(x)instead ofsum(widths) - Experimental
tf_wrapfunctionality added totoStringMatrixPrintFormmethod -
MatrixPrintFormclass now includes atable_insetelement - Add
table_insetandtable_inset<-generics now exported -
toStringnow respectstable_insetvalues set on aMatrixPrintFormobject - Use
exact=TRUEfor all calls toattrin accessor functions. - length-zero values of
na_strare now silently interpreted as the default value ("NA"), as are any missing values inna_strof length > 0. - adding wrapping of titles, subtitles, and footers.
-
page_lcppfunction now provided to map page size and font combinations to lines and characters per page. - getters and setters for the components of
MatrixPrintFormobjects are now exported (i.e.,mf_spansand friends). -
na_strcan now be length >1, and is matched in position to NAs in that case. -
format_valuenow returns solely thena_strvalue when all-NA values are formatted with certain formats (currently"(N=xx)",">999.9",">999.99","x.xxxx | (<0.0001)")
formatters 0.3.2.5
-
label_vars<-now correctly adheres to names of value, even in different order thannames(x). Fixes rlistings#8
formatters 0.3.2.3
- fix regression caused by
0.3.2.2invert_pag_indiceswhenobjis not aMatrixPrintFormobject
formatters 0.3.2.2
- Added support for
trailing_sepcolumn to row_info data.frames (e.g,pagdfrowconstructor) -
trailing_sepinfo now used in both printing and pagination -
col_gapis now an element ofMatrixPrintFormobjects -
vert_pag_indicesfixed to correctly take gap between printed columns into account
formatters 0.3.2.1
- calling
var_labelson a data.frame with no columns is no longer an error (insightsengineering/rtables#224)
formatters 0.3.2
CRAN release: 2022-06-09
- Change warning when non-UTF line sep default is used to message, and display it only during interactive sessions (once per session).
formatters 0.3.0
- add exported
default_hsepfunction for use her and in reverse-dependencies (inclrtables) - format_value now respects
na_streven when format isxx(previously it returned"NA"always) - rename
linesepargument tohsepintoStringgeneric signature - add
indent_sizeargument tomatrix_formgeneric signature - add a number of
"__ (__)"(no pct) formats in response to #23 - Switch to
testthatas testing framework