Learn R Programming

plotfunctions (version 1.4)

Various Functions to Facilitate Visualization of Data and Analysis

Description

When analyzing data, plots are a helpful tool for visualizing data and interpreting statistical models. This package provides a set of simple tools for building plots incrementally, starting with an empty plot region, and adding bars, data points, regression lines, error bars, gradient legends, density distributions in the margins, and even pictures. The package builds further on R graphics by simply combining functions and settings in order to reduce the amount of code to produce for the user. As a result, the package does not use formula input or special syntax, but can be used in combination with default R plot functions. Note: Most of the functions were part of the package 'itsadug', which is now split in two packages: 1. the package 'itsadug', which contains the core functions for visualizing and evaluating nonlinear regression models, and 2. the package 'plotfunctions', which contains more general plot functions.

Copy Link

Version

Install

install.packages('plotfunctions')

Monthly Downloads

2,839

Version

1.4

License

GPL (>= 2)

Last Published

April 28th, 2020

Functions in plotfunctions (1.4)

convertFile

Replacing separators (for example, decimal and thousand separators).
check_normaldist

Compare distribution of data with normal distribution.
drawDevArrows

Draw arrows between different plots.
add_bars

Adding bars to an existing plot.
alpha

Adjusting the transparency of colors.
color_contour

Creates a contour plot with colored background.
getArrowPos

Converts coordinates in current plot region to device positions (in inch).
addInterval

Draw intervals or arrows on plots.
add_n_points

Add groups of points to a plot
errorBars

Add error bars to a plot.
dotplot_error

Utility function
getFigCoords

Get the figure region as coordinates of the current plot region, or as corrdinates of the figure region.
alphaPalette

Manipulate the transparency in a palette.
emptyPlot

Utility function
getDec

Return the number of decimal places.
fill_area

Utility function
getCoords

Convert proportions into coordinates of the plot or figure region.
findAbsMin

Return the value (or the element with the value) closest to zero.
find_n_neighbors

Return n neighbors around given indices.
getRatioCoords

Move a vector n elements forward or backward.
legend_margin

Add legend with respect to figure instead of plot region. Allows to move legend to margin of plot.
plot_image

Add images to plots.
getProps

Transform coordinates into proportions of the figure or plot region.
img

Image object.
move_n_point

Move a vector n elements forward or backward.
isColor

Check whether color specifications exists.
inch2coords

Convert device position (inch) to coordinates in current plot region.
gradientLegend

Add a gradient legend to a plot.
plot_error

Utility function
get_palette

Retrieve the color scheme for contour plots.
orderBoxplot

Order boxplot stats following a given ordering.
marginDensityPlot

Plot density of distribution in margins of the plot.
list2str

Combine list values as string.
group_sort

Sort split by grouping predictor.
firstLetterCap

Capitalize first letter of a string.
getRange

Function for rounding and/or segmenting a range.
plot_signifArea

Creates a colored surface plot from data frame input.
plotfunctions

Package plotfunctions: Various Functions to Facilitate Visualization of Data and Analysis
plotsurface

Creates a colored surface plot from data frame input.
se

Calculate standard error of the mean.
sortBoxplot

Produce box-and-whisker plot(s) ordered by function such as mean or median.
sortGroups

Sort groups based on a function such as mean value or deviation.