Learn R Programming

⚠️There's a newer version (3.0.3) of this package.Take me there.

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,740

Version

3.0.0

License

GPL (>= 3)

Maintainer

Max Gordon

Last Published

January 3rd, 2022

Functions in Gmisc (3.0.0)

Gmisc-package

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

A simple bezier arrow
boxGrob

Create a box with text
Gmisc-deprecated

Deprecated function(s) in Gmisc
boxPropGrob

Create a box with a color split
Transition-class

A reference class for generating transition plots
bezierArrowGradient

A bezier arrow with gradient
calculateLinesAndArrow

Gets offsetted lines
align

Align boxes
assert_unit

Checks if unit or number 0-1
connectGrob

Connect boxes with an arrow
gnrlBezierPoints

Generates a generalized Bézier line
has

An R alternative to the lodash has in JavaScript
docx_document

Formatter wrapper for html_document, facilitates easier porting to docx
fastDoCall

An alternative to the internal do.call
prGetDescHeader

Retrieve basic description stats by header
prFtpScriptRemoval

Removes the <script>*</scrip>
copyAllNewAttributes

A simple thing to keep the attributes
coords

Get the box coordinates
describeMean

Describe the mean
prGridPlotTitle

Adds a title to the plot
descGetMissing

Get statistics for missing data
figCapNoNext

Gets the next figure caption number
describeMedian

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

Helper to [getDescriptionStatsBy()]
figCapNo

Adds a figure caption number
prTpPlotBoxes

Plot boxes and arrows
convertShowMissing

A function for converting a show_missing variable.
figCapNoLast

Gets the last figure caption number
mergeLists

Merging of multiple lists
print.Gmisc_list_of_boxes

Output boxes
prAddDescStats

Add a p-value column to the results
getAbsoluteWidth

Translates "npc" widths into absolute units
mergeLists_internal

A helper function for mergeLists that does the actual work.
describeFactors

Describes factor variables
pathJoin

A path join function
getVectorAngle

Gets an angle
getSvdMostInfluential

Gets the maximum contributor variables from svd()
getBezierAdj4Arrw

Gets the bezier points adjusted for an arrow
moveBox

Move a boxGrob
prPushMarginViewport

Pushes viewport with margins
prAddDescUnitColumn

Add a units column to the results
prFtpOtherChanges

Changes lines for XML-conformity
prFtpOtherRemoval

Removes other unwanted lines
insertRowAndKeepAttr

Insert a row into a matrix
describeProp

A function that returns a description proportion that contains the number and the percentage
latex.descMrg

prBuildSubLabel

Add a sub-label to boxPropGrob
prSetMaxWidth

Updates the css max-width
prTcPlotBoxColumn

Plots a column of boxes
prTcValidateAndPrepClr

Checks and prepares colors
prTpGetBoxPositions

Gets the box position
getDescriptionStatsBy

Creating of description statistics
getPvalWilcox

P-value extractors for getDescriptionStatsBy
distance

Get the distance between grid objects
getGridVal

Gets grid value
prConvert2Coords

Converts an object to coordinates
isHorizontal

Just a simple help with interpreting the radians
mergeDesc

Prepares a matrix for htmlTable from a list
prAddEmptyVals

Convert the by-list into a matrix compatible format
prAddTotalDescColumn

Add a total column to the results
prCreateBoxCoordinates

Creates coordinates for box
prTpGetBoxSizedTextGrob

Gets the text size for the box
prFixDescRownames

Fix rownames for descriptive results
prTpGetBoxPropClr

Gets the color for the given box
prTpGetColors

Gets a set of colors or just one color
prFtpHeaderStyle

Helper to ftp_document
prCaptionFix

Fixes the caption for elements without caption
time2spanTxt

A dense time-span text
retrieve

An R alternative to the lodash get in JavaScript
prGetStatistics

Get statistics according to the type
prDescGetAndValidateDefaultRef

A helper function for the description stats
transitionPlot

A transition plot
prGetTextGrobCex

Just a simple acces to the gp$cex parameter
prFactorDescs

Helper to [getDescriptionStatsBy()]
prTcPlotArrows

Plots the arrows within a single transition set
set_column_labels

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

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

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

Helper to [getDescriptionStatsBy()]
spread

Spread boxes
prPasteVec

Collapses a vector for throwing errors
prTpPlotBox

Plots the box for the transition plot
yamlDump

Outputs an object
validateAndConvertVectorInputs

Checks the input of a vector
prTpPlotArrows

Plots the arrows