order_points: Re-order a data frame for plotting points in ggplot

Description Usage Arguments Value

View source: R/order_points.R

Description

Re-order a data frame to control the plotting order of points in ggplot. This is designed to control over-plotting of points by sorting the data frame based on input arguments. It is used in plots by symbol and color, where overplotting may affect readability.

Usage

1
order_points(x, method)

Arguments

x

data frame containing data to re-order

method

character string, specifying how to order the rows. Currently accepted values are "random", which randomizes the order, and "input", which returns the input data frame as-is.

Value

a data frame with same contents as x, with rows re-ordered according to method.


mjdufort/miscHelpers documentation built on Sept. 24, 2018, 7:09 p.m.