pmtables 0.10.1
Bugs Fixed
- Fixed a bug in
pt_data_inventory()where missing values in thebycolumn resulted in the missing value summary row getting labeled as an “All data” summary row; this fix replaces missing values with the character string"NA"as the table is built and “All data” summary rows are now properly labeled (#373).
pmtables 0.10.0
- Brackets in table body or table notes are now sanitized or masked by default to
\lbrackor\rbrack; this behavior can be modified or turned off through an argument calledmask_bracketwhich is passed tomake_tabular()(masking brackets in the table body) ortab_notes()(masking brackets in table notes); bothmake_tabular()andtab_notes()can receive themask_bracketargument throughstable()orstable_long()(#367).
Bugs Fixed
- Fixed a bug in parsing TeX glossary entries with braces around acronym options such as
shortpluralorlongpluralviaread_glossary(); parsing is now done throughtools::parseLatex(#370).
pmtables 0.9.0
-
pt_demographics()was refactored (#363).- Include the median in the default summary function
- Rows where
Statisticis “Missing” (provided by the default summary function for continuous data) and all summary values are “0” are dropped by default - New argument
drop_misscan be used to optionally retain the “Missing” stat for all continuous data summaries
pt_inventory_long()is a new function to create data inventory summaries like those generated bypt_data_inventory(), but stratified by multiple covariates (#360).When a caption macro name is provided to
stable_long(), it will only be used if the macro is defined; if the macro is not defined, some replacement text is included noting that the macro will be used once it is defined (#355).
pmtables 0.8.1
Bugs Fixed
- Fixed a bug in preview helpers (
st_as_image()andst2report()) where a list was getting passed as.envirtoglue::glue()rather than an environment; this was causingglue::glue()to fail after changes rolled out in glue version 1.8.0 (#346).
pmtables 0.8.0
- New functionality to include output file path information in the table annotation (#341).
pmtables 0.7.0
- New functionality to create table notes from glossary files (#326).
-
read_glossary()reads from.texor.yamlformatted files, returning a glossary object -
select_glossary()selects specific entries from a glossary object -
as_glossary()creates a glossary object on the fly or from a list -
glossary_notes()creates notes from a glossary object, a list, or the name of a glossary file -
st_notes_glo()creates and and attaches notes to a table in a pipeline
-
-
stable_save_image()added to create an image from a table and save to a specific location; this builds onst_aspdf()andst_aspng(), adding convenient syntax and options (#333). - The
maxexargument tosig()can now be set through thepmtables.maxexoption (#328).
Bugs Fixed
- Fixed a bug in
pt_cat_long()when thebyargument is used with no all data summary (#330).
pmtables 0.6.0
st_caption()function added to associate a caption (including short caption and possibly a label) to any table; captions will appear inst2report()outputs; captions will always be written to file forstable_longoutputs and can be optionally written to file forstableoutputs (#313).yaml_as_df()will now retain row names in a column named by the new argumentrow_var(#317).st_align(),st_left(),st_right()andst_center()can now be called multiple times in a pipeline, supported by new update method foraligncolobjects (#315).st_clone()function added to make a copy ofstobjectobjects (#314).The
id_colargument topt_cont_long()andpt_cont_wide()is deprecated (#305).
Bugs Fixed
- Fixed bug where
sumrowswas not recognized as a valid field instobjectobjects (#312).
pmtables 0.5.2
- pmtables has been updated to be compatible with stringr 1.5.0, which changed the classes of pattern modifiers (#302).
pmtables 0.5.1
New function
st_filter()to filter data item in a pipeline (#298).Add
summarize_allandall_name_stackedarguments topt_data_inventory()(#297).
Bugs Fixed
Fixed bug where
all_namewas not getting used inpt_data_inventory()(#297).Fixed bug where detached table notes were getting rendered too close to the main table when building standalone pdf under certain TeX distributions (#286).
pmtables 0.5.0
New functions
st_as_image(),st2pdf(), andst2png()to render tables with TeX to eitherpdforpngformat; image files may be kept on disk or read back for display while knitting;pdflatexsystem dependency forpdfimages andlatex+dvipngforpngimages; additional Suggested packages includemagickandpdftools(#277, #278).sig()now returns character when integer type is passed (#272).st_new()is now generic with dispatch fordata.frameand objects with classpmtable; most pipeline functions can now be used to customize tables coming frompt_cat_*,pt_cont_*,pt_demographics()andpt_data_inventory()(#274).New functions
st_notes_detach(),st_notes_rm(),st_notes_app(),st_notes_str(),st_notes_sub()andst_notes_conf()to help working with table notes in a pipe context (#274).st_span()andst_span_split()acceptalignargument to push column spanner titles to the left, right or center (default); the argument eventually gets passed tocolgroup()(#261).pt_cat_wide(),pt_cat_long()andpt_demographics()gain argumentdenomto alter the denominator when calculating percents for categorical data summaries (#268).pt_cat_wide()gains argumentcompleteto display missing levels ofbyandpanel(#268).Put stories in yaml format; add script to build validation docs from the yaml file (#269, #270).
pmtables 0.4.1
colgroup()(andst_span()) gains analignargument to position the spanner title on left or right in addition to the center (default) #260, #261.rowpanel()(andst_panel()) gainsjutargument to push non-panel table contents to the right relative to the panel header row so that contents under the panel header are indented #251, #253.Panel header rows are now modified so that the header row stays with the first non-header row for longtable output #252, #253.
Consistent
BQL/BLQhandling for column titles and table notes forpt_data_inventory()#254, #255.
pmtables 0.4.0
Add
cols_omitoption to omit column header data (#213)Add
pt_demographicsfunction to generate a new table of both continuous and categorical data (#186, #249)Add
title_sideargument tocolsplit()so that the title can be taken from left or right side of split (#231)Add
hlineargument torowgroup()constructor to make the horizontal line above the panel data optional (#215)Refactor
pt_data_inventory()to calculate percent BLQ using denominator that is the sum of the number of observations BLQ and non-BLQ / non-missing (#221, #222)List names are now escaped when passing a list of tables to
st2report()and friends (#232)Add newline after printing table text using
st_asis()(#224)
pmtables 0.3.3
Fix bug where arguments could not be passed along to
stable_long()when coercing pmtable output (#203)Fix bug where user-specified font size was not getting propagated to long table output with
stable_long()(#204)
pmtables 0.3.1
- Add
.listargument tost_rename()allowing user to pass rename information as a named list with formatold name = new name#189 - Fix bug where
drop_misswasn’t executing correctly #182 -
stable_long()is now a generic function with methods fordata.frame,stobjectandpmtable#179 - Expand documentation for data summary functions
-
st_span()was slightly refactored so that it would dispatch tost_span_split()when thesplitargument was passed #173 - Fixed a bug where
span_split()was updating column names, but this was happening before other spans were calculated #172 - The categorical data summary functions now check for missing values (
NA) and will replace them with the string"NA"and issue a warning #117
pmtables 0.3.0
- Add landscape mode when previewing tables with
st2report(),st2article()orst2doc(); seelandscapeargument tost_wrap()#129 - Add
lt_cap_shortargument tostable_long()to set a short table title that will appear in list of tables #131 - Fix a bug in continuous data summary tables when no observations were found in a particular group; use
na_fillargument to set placeholder #133 - Add ability to accumulate
hlineindices when set withst_hline()#134 - Fix a bug in
cols_boldthat prevented sanitizing text prior to styling as bold #141 - Add ability to introduce row breaks in spanner titles #143
- Add
st2report()to quickly preview tables in a real-like report document, build directly withpdflatex#148 - Add
st2article()to quickly preview tables in a latexarticle-like, built directly withpdflatex#148 - Add
st_asis()function andasisargument tost_wrap(); pipe tables tost_asis()or useasisargument to render tables in line in an Rmd document; in addition to formatting output “as-is”, latex dependencies are also invoked #149 - Expand
yaml_as_df()functionality to accept table columns by position, rather than name #154 - Add
stable()method forstobject#159 - Fix bug where column spanners were not getting displayed in longtable #165
pmtables 0.2.0
- Add
byargument topt_cont_longso that, whenpanelis also passed, the table is paneled bycoland is “by” thepanelvariable #92 - Refactor
pt_cat_longso that summary numbers are shown underneath column labels #102 - Refactor longtable row and column spacing so that they use
rowandcolintab_size()with the same behavior as tabular /stable()#105 - Add
cols_extrafeature, allowing extra column header information passed as a data frame (seetab_cols()) #102, #118 - Added documentation for
dataarguments to reinforce that pmtables doesn’t filter or subsetdataprior to processing or summarizing #120 - Fix bug in
stable_long()wherestable_filewasn’t getting saved - Add
nsummary column topt_cat_wide()#80 - Add functions that return table notes for continuous and discrete data summaries and data inventory tables #114
- Make
pt_wrap()generic; add method forstable_longthat doesn’t wrap with table #121
pmtables 0.1.0
- Adding NEWS file
- Add
duplicates_okargument to rowpanel - Error if duplicate panel names found and
duplicates_okis FALSE - Refactor how panel groupings are determined - non-repeating values rather than unique
- Added debug_data argument to stable; this adds an environment to the output with some data that underlies the table; the environment can be accessed with
get_debug_data() - Added complete series of
st_*functions that can be used in a pipeline to set arguments forstable(); seeinst/demo-pipe.pdf -
st2docwill render multiple page document when a list of tables is passed in as text - Changed
stableargument frombold_colstocol_bold - Column names are only rendered with bold font when requested using
col_boldargument - The prefixes for
r_fileandoutput_fileare only settable with optionsr.file.labelandoutput.file.label, respectively - Dropped
col_space,row_spaceandfontsizearguments tostable(); they should be set with a call totab_size - Add
st_sizes()to setsizesargument tostable() - Refactor
stable()function in order to reduce cyclomatic complexity and shorten overall function length in response to brief review and comment by TS representative - Make stable a generic function; methods for data.frame and pmtable
- All pmtables functions now accept
panelargument as a rowgroup object - Add
as.panel()function for constructing rowgroup objects - For pmtables functions: when
panelis passed with an alternate name, the name is is used to set the prefix - Fixed bug where column names were getting sanitized before rename happened #62
- Pick up option
pmtables.dirto set output directory forstable_save() - Pick up option
mrg.scriptto set script name inst_files()andtab_notes() - Refactored the way that table cols and units are assembled; column labels are split on
...to create multi-line column names - Add
header_rowargument totab_cols()to control the spacing between column labels and between labels and units - Fix warning message when trying to align a column not in the data set
- Fix warning message when trying to add unit to column not in the data set
- Add several new package options; see
?pt_opts - Add
centerargument tocol_fixed; whenraggedisno, the column can still be fixed and centered - Dots (
...) added tost_new()/st_data()to be collected by args - Add
st_units()pipeline function - Add
tex_bold() function to style data frame contents - Add
tex_it()function to style data frame contents - Add
st_edit() - Refactor
st_hline(); allow to add hline by regexp across whole data frame or targeted - Refactored
st_boldandst_itto target columns or whole data frame - Add
st_drop() - Add data sets
analysis1,pmt_pk,pmt_first,pmt_obs - Change argument names for
tab_cols: allcol_xyzarguments are renamed tocols_xyz - Add
find_bq_colfunction to allow eitherBQLorBLQas default value forbq_colargument topt_data_inventory - Add
patternandcolsarguments tost_sumrow; this allows calculation ofrowsbased on a regular expression - Add
df_grep_rowsanddf_grepl_rowsfunctions for finding rows where a regular expression is matched - Add
pmtables.escapeoption to pass a character vector of items to be escaped - Unit of escape is now individual positions in a vector rather than the whole vector itself
- No longer requiring or assuming that
header_row(tab_size()) is a negative number; enter a negative number if you want to remove space between header rows; this should only be required when row space is increased
