rollPlot: rollPlot rolling plotting function

Description Usage Arguments Examples

Description

This function orders and bins a variable in to groups defined by a window and step size then computes rolling averages for multipe variables across each bin.

Usage

1
2
3
4
rollPlot(t, x, y, ylab = "", xlab = "", w = 400, s = 80,
  f = "mean", scale = "linear", feature = "data points", data = F,
  samples = "Samples", split = F, sd = F, cols = vector(),
  facet = NA, splitscale = "fixed", points = F, labels = vector())

Arguments

t

Table of data.

x

Variable to be binned on x-axis.

y

Vector of variables to plot on y-axis.

ylab

Label for Y-axis. Defaults to "variable".

xlab

Label for X-axis.

w

Window size (number of values per bin). Defaults to 400.

s

Step size (number of values to move along for each bin). Defaults to 80.

f

Function to apply to y values for each bin ("mean","median","sum"). Defaults to "mean".

scale

Scale the x-axis ("linear"=linear spacing of points based value of bin or "bins"=equal spacing between all bins). Defaults to "linear".

feature

Name of features being binned. Defaults to "data points".

data

Returns a table in long form if set to True.

samples

Set the legend name. Defaults to "Samples".

split

Plot samples separately.

sd

Plot standard deviation as ribbon when plotting mean.

facet

Variable to facet by.

splitscale

Scales for split plots "fixed"(default),"free",free_x","free_y".

points

Plot points at each data position

labels

Set the labels for samples.

Examples

1

swebb1/quest documentation built on Dec. 18, 2019, 10:33 a.m.