Learn R Programming

The Gmisc package

Tools for making:

  • the descriptive "Table 1" used in medical articles
  • transition plot for showing changes between categories
  • flow charts based on the grid package
  • a method for variable selection based on the SVD
  • Bézier lines with arrows complementing the ones in the 'grid' package, and more.

Copy Link

Version

Install

install.packages('Gmisc')

Monthly Downloads

1,337

Version

3.0.3

License

GPL (>= 3)

Maintainer

Last Published

August 25th, 2023

Functions in Gmisc (3.0.3)

Gmisc-package

Collection of functions for plotting relations, generating tables, and more.
boxGrob

Create a box with text
bezierArrowSmpl

A simple bezier arrow
Gmisc-deprecated

Deprecated function(s) in Gmisc
Transition-class

A reference class for generating transition plots
boxPropGrob

Create a box with a color split
align

Align boxes
bezierArrowGradient

A bezier arrow with gradient
calculateLinesAndArrow

Gets offsetted lines
assert_unit

Checks if unit or number 0-1
describeFactors

Describes factor variables
coords

Get the box coordinates
descGetMissing

Get statistics for missing data
connectGrob

Connect boxes with an arrow
describeMedian

A function that returns a description median that contains the interquartile range or the full range
describeMean

Describe the mean
describeProp

A function that returns a description proportion that contains the number and the percentage
distance

Get the distance between grid objects
convertShowMissing

A function for converting a show_missing variable.
copyAllNewAttributes

A simple thing to keep the attributes
getGridVal

Gets grid value
figCapNoNext

Gets the next figure caption number
docx_document

Formatter wrapper for html_document, facilitates easier porting to docx
getPvalWilcox

P-value extractors for getDescriptionStatsBy
fastDoCall

An alternative to the internal do.call
figCapNo

Adds a figure caption number
getDescriptionStatsBy

Creating of description statistics
figCapNoLast

Gets the last figure caption number
getBezierAdj4Arrw

Gets the bezier points adjusted for an arrow
getAbsoluteWidth

Translates "npc" widths into absolute units
isHorizontal

Just a simple help with interpreting the radians
mergeDesc

Prepares a matrix for htmlTable from a list
mergeLists

Merging of multiple lists
gnrlBezierPoints

Generates a generalized Bézier line
getSvdMostInfluential

Gets the maximum contributor variables from svd()
mergeLists_internal

A helper function for mergeLists that does the actual work.
latex.descMrg

getVectorAngle

Gets an angle
insertRowAndKeepAttr

Insert a row into a matrix
has

An R alternative to the lodash has in JavaScript
prAddEmptyVals

Convert the by-list into a matrix compatible format
prConvert2Coords

Converts an object to coordinates
prCaptionFix

Fixes the caption for elements without caption
prBuildSubLabel

Add a sub-label to boxPropGrob
prAddDescStats

Add a p-value column to the results
prAddTotalDescColumn

Add a total column to the results
prCreateBoxCoordinates

Creates coordinates for box
prFtpHeaderStyle

Helper to ftp_document
prFixDescRownames

Fix rownames for descriptive results
prGetDescHeader

Retrieve basic description stats by header
prAddDescUnitColumn

Add a units column to the results
moveBox

Move a boxGrob
pathJoin

A path join function
prPropDescs

Helper to [getDescriptionStatsBy()]
prPasteVec

Collapses a vector for throwing errors
prFtpScriptRemoval

Removes the <script>*</scrip>
prFactorDescs

Helper to [getDescriptionStatsBy()]
prTcPlotBoxColumn

Plots a column of boxes
prFtpOtherChanges

Changes lines for XML-conformity
prDescGetAndValidateDefaultRef

A helper function for the description stats
prTcValidateAndPrepClr

Checks and prepares colors
prFtpOtherRemoval

Removes other unwanted lines
retrieve

An R alternative to the lodash get in JavaScript
prTpGetBoxSizedTextGrob

Gets the text size for the box
prTpGetColors

Gets a set of colors or just one color
set_column_labels

Add [Hmisc::label()] to multiple columns
prPushMarginViewport

Pushes viewport with margins
prSetMaxWidth

Updates the css max-width
prGridPlotTitle

Adds a title to the plot
prTcMatchClr

Finds the matching colors for the new addition based on the original set of colors
prGetStatistics

Get statistics according to the type
prGetTextGrobCex

Just a simple acces to the gp$cex parameter
prTcPlotArrows

Plots the arrows within a single transition set
prNumericDescs

Helper to [getDescriptionStatsBy()]
time2spanTxt

A dense time-span text
transitionPlot

A transition plot
set_column_units

Add [Hmisc::unit()] to multiple columns
prTpPlotBox

Plots the box for the transition plot
spread

Spread boxes
prTpPlotArrows

Plots the arrows
prTpGetBoxPositions

Gets the box position
print.Gmisc_list_of_boxes

Output boxes
prTpPlotBoxes

Plot boxes and arrows
yamlDump

Outputs an object
prTpGetBoxPropClr

Gets the color for the given box
validateAndConvertVectorInputs

Checks the input of a vector