khsmisc: khsmisc: Miscellaneous functions for epidemiology research

khsmiscR Documentation

khsmisc: Miscellaneous functions for epidemiology research

Description

This package provides a set of custom functions for data handling, vector manipulation, and tabulation, and plotting.

Functions for data handling

varlist: Variable list/dataset inventory, Stata style

write_csv_safely, save_safely, pdf_safely: Export CSV files, R objects, or PDFs without overwriting existing files

Functions for vectors

scale_to_range: Scale a vector to a given range

Mode: Most common value

roundp: Round and format p-values

Functions for descriptive tables

tabulate_rowcol: A contingency table for categorical variables.

tsummary: A descriptive table for continuous variables

Functions for plots

stripplot: Box-whiskers/dot plot

corrmat: Correlation matrix

exclusion_flowchart: Flowcharts of exclusions from a study

geom_stepribbon: Step ribbon plots

brickchart: Brick chart

See Also

https://github.com/stopsack/khsmisc


stopsack/khsmisc documentation built on Sept. 22, 2023, 12:26 p.m.