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

Version

2.0.2

License

GPL (>= 3)

Maintainer

Max Gordon

Last Published

May 4th, 2021

Functions in Gmisc (2.0.2)

Gmisc-deprecated

Deprecated function(s) in Gmisc
align

Align boxes
Transition-class

A reference class for generating transition plots
Gmisc-package

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

Get statistics for missing data
bezierArrowGradient

A bezier arrow with gradient
assert_unit

Checks if unit or number 0-1
describeFactors

Describes factor variables
bezierArrowSmpl

A simple bezier arrow
figCapNoNext

Gets the next figure caption number
convertShowMissing

A function for converting a show_missing variable.
connectGrob

Connect boxes with an arrow
distance

Get the distance between grid objects
describeProp

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

Create a box with a color split
prTpGetBoxPropClr

Gets the color for the given box
prFtpOtherChanges

Changes lines for XML-conformity
calculateLinesAndArrow

Gets offsetted lines
prTpGetBoxSizedTextGrob

Gets the text size for the box
prFtpOtherRemoval

Removes other unwanted lines
boxGrob

Create a box with text
getAbsoluteWidth

Translates "npc" widths into absolute units
describeMean

Describe the mean
docx_document

Formatter wrapper for html_document, facilitates easier porting to docx
fastDoCall

An alternative to the internal do.call
describeMedian

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

Get the box coordinates
copyAllNewAttributes

A simple thing to keep the attributes
mergeLists

Merging of multiple lists
mergeLists_internal

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

Gets the maximum contributor variables from svd()
prConvert2Coords

Converts an object to coordinates
getVectorAngle

Gets an angle
prCreateBoxCoordinates

Creates coordinates for box
gnrlBezierPoints

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

Gets the bezier points adjusted for an arrow
getDescriptionStatsBy

Creating of description statistics
has

An R alternative to the lodash has in JavaScript
pathJoin

A path join function
moveBox

Move a boxGrob
prGetTextGrobCex

Just a simple acces to the gp$cex parameter
figCapNo

Adds a figure caption number
mergeDesc

Prepares a matrix for htmlTable from a list
figCapNoLast

Gets the last figure caption number
isHorizontal

Just a simple help with interpreting the radians
prTpGetColors

Gets a set of colors or just one color
prTpPlotArrows

Plots the arrows
prGridPlotTitle

Adds a title to the plot
prFtpScriptRemoval

Removes the <script>*</scrip>
print.Gmisc_list_of_boxes

Output boxes
prTcPlotArrows

Plots the arrows within a single transition set
prGetStatistics

Get statistics according to the type
prBuildSubLabel

Add a sub-label to boxPropGrob
prCaptionFix

Fixes the caption for elements without caption
prSetMaxWidth

Updates the css max-width
prTcMatchClr

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

Plots the box for the transition plot
transitionPlot

A transition plot
prTpPlotBoxes

Plot boxes and arrows
validateAndConvertVectorInputs

Checks the input of a vector
yamlDump

Outputs an object
retrieve

An R alternative to the lodash get in JavaScript
getGridVal

Gets grid value
getPvalWilcox

insertRowAndKeepAttr

Insert a row into a matrix
latex.descMrg

prDescGetAndValidateDefaultRef

A helper function for the description stats
prFtpHeaderStyle

Helper to ftp_document
prPasteVec

Collapses a vector for throwing errors
prTpGetBoxPositions

Gets the box position
prPushMarginViewport

Pushes viewport with margins
prTcValidateAndPrepClr

Checks and prepares colors
spread

Spread boxes
prTcPlotBoxColumn

Plots a column of boxes
time2spanTxt

A dense time-span text