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

1.11.0

License

GPL (>= 3)

Maintainer

Max Gordon

Last Published

July 3rd, 2020

Functions in Gmisc (1.11.0)

boxPropGrob

Create a box with a color split
calculateLinesAndArrow

Gets offsetted lines
Gmisc-deprecated

Deprecated function(s) in Gmisc
bezierArrowSmpl

A simple bezier arrow
Transition-class

A reference class for generating transition plots
align

Align boxes
assert_unit

Checks if unit or number 0-1
describeMean

Describe the mean
describeMedian

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

Create a box with text
Gmisc-package

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

A bezier arrow with gradient
connectGrob

Connect boxes with an arrow
descGetMissing

Get statistics for missing data
getGridVal

Gets grid value
coords

Get the box coordinates
copyAllNewAttributes

A simple thing to keep the attributes
describeProp

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

A function for converting a show_missing variable.
distance

Get the distance between grid objects
describeFactors

Describes factor variables
docx_document

Formatter wrapper for html_document, facilitates easier porting to docx
figCapNoNext

Gets the next figure caption number
getBezierAdj4Arrw

Gets the bezier points adjusted for an arrow
getDescriptionStatsBy

Creating of description statistics
getAbsoluteWidth

Translates "npc" widths into absolute units
getPvalWilcox

has

An R alternative to the lodash has in JavaScript
fastDoCall

An alternative to the internal do.call
getSvdMostInfluential

Gets the maximum contributor variables from svd()
prConvert2Coords

Converts an object to coordinates
gnrlBezierPoints

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

Insert a row into a matrix
latex.descMrg

getVectorAngle

Gets an angle
figCapNo

Adds a figure caption number
moveBox

Move a boxGrob
pathJoin

A path join function
mergeLists

Merging of multiple lists
figCapNoLast

Gets the last figure caption number
isHorizontal

Just a simple help with interpreting the radians
prFtpScriptRemoval

Removes the <script>*</scrip>
prTpPlotBox

Plots the box for the transition plot
spread

Spread boxes
time2spanTxt

A dense time-span text
prGetStatistics

Get statistics according to the type
prTpPlotBoxes

Plot boxes and arrows
prBuildSubLabel

Add a sub-label to boxPropGrob
mergeDesc

Prepares a matrix for htmlTable from a list
prCreateBoxCoordinates

Creates coordinates for box
prFtpOtherChanges

Changes lines for XML-conformity
mergeLists_internal

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

Fixes the caption for elements without caption
prFtpOtherRemoval

Removes other unwanted lines
prGetTextGrobCex

Just a simple acces to the gp$cex parameter
prTpGetBoxPropClr

Gets the color for the given box
prFtpHeaderStyle

Helper to ftp_document
prTpGetBoxSizedTextGrob

Gets the text size for the box
prDescGetAndValidateDefaultRef

A helper function for the description stats
prGridPlotTitle

Adds a title to the plot
retrieve

An R alternative to the lodash get in JavaScript
print.Gmisc_list_of_boxes

Output boxes
prTcPlotBoxColumn

Plots a column of boxes
prTcPlotArrows

Plots the arrows within a single transition set
prTcMatchClr

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

A transition plot
prTcValidateAndPrepClr

Checks and prepares colors
prTpGetBoxPositions

Gets the box position
prSetMaxWidth

Updates the css max-width
prPasteVec

Collapses a vector for throwing errors
validateAndConvertVectorInputs

Checks the input of a vector
prPushMarginViewport

Pushes viewport with margins
prTpGetColors

Gets a set of colors or just one color
yamlDump

Outputs an object
prTpPlotArrows

Plots the arrows