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

Version

1.8.1

License

GPL (>= 3)

Maintainer

Max Gordon

Last Published

April 14th, 2019

Functions in Gmisc (1.8.1)

bezierArrowGradient

A bezier arrow with gradient
boxGrob

Create a box with text
describeMedian

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

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

Create a box with a color split
figCapNo

Adds a figure caption number
figCapNoLast

Gets the last figure caption number
describeFactors

Describes factor variables
describeMean

Describe the mean
prGetTextGrobCex

Just a simple acces to the gp$cex parameter
Gmisc-deprecated

Deprecated function(s) in Gmisc
Transition-class

A reference class for generating transition plots
insertRowAndKeepAttr

Insert a row into a matrix
Gmisc-package

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

figCapNoNext

Gets the next figure caption number
calculateLinesAndArrow

Gets offsetted lines
has

An R alternative to the lodash has in JavaScript
assert_unit

Checks if unit or number 0-1
distance

Get the distance between boxes
getSvdMostInfluential

Gets the maximum contributor variables from svd()
prGridPlotTitle

Adds a title to the plot
latex.descMrg

getVectorAngle

Gets an angle
gnrlBezierPoints

Generates a generalized B<U+00E9>zier line
isHorizontal

Just a simple help with interpreting the radians
docx_document

Formatter wrapper for html_document, facilitates easier porting to docx
prSetMaxWidth

Updates the css max-width
prTcMatchClr

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

A helper function for the description stats
retrieve

An R alternative to the lodash get in JavaScript
prFtpOtherRemoval

Removes other unwanted lines
prFtpOtherChanges

Changes lines for XML-conformity
transitionPlot

A transition plot
connectGrob

Connect boxes with an arrow
getAbsoluteWidth

Translates "npc" widths into absolute units
prTpGetColors

Gets a set of colors or just one color
prFtpHeaderStyle

Helper to ftp_document
prTpGetBoxPositions

Gets the box position
prTcValidateAndPrepClr

Checks and prepares colors
getBezierAdj4Arrw

Gets the bezier points adjusted for an arrow
mergeDesc

Prepares a matrix for htmlTable from a list
prPasteVec

Collapses a vector for throwing errors
mergeLists

Merging of multiple lists
coords

Get the box coordinates
convertShowMissing

A function for converting a show_missing variable.
getDescriptionStatsBy

Creating of description statistics
prPushMarginViewport

Pushes viewport with margins
prTpPlotArrows

Plots the arrows
prTpPlotBox

Plots the box for the transition plot
prTpPlotBoxes

Plot boxes and arrows
getGridVal

Gets grid value
mergeLists_internal

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

Plots the arrows within a single transition set
validateAndConvertVectorInputs

Checks the input of a vector
prTcPlotBoxColumn

Plots a column of boxes
prCaptionFix

Fixes the caption for elements without caption
prFtpScriptRemoval

Removes the <script>*</scrip>
prGetStatistics

Get statistics according to the type
prTpGetBoxPropClr

Gets the color for the given box
prTpGetBoxSizedTextGrob

Gets the text size for the box
bezierArrowSmpl

A simple bezier arrow
copyAllNewAttributes

A simple thing to keep the attributes
descGetMissing

Get missingness statistics
fastDoCall

An alternative to the internal do.call