bplot: bplot rolling average plotting function

Description Usage Arguments Examples

View source: R/bplot.r

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
bplot(t, x, y, ys = 1, ystep = 0, ylab = "", axis3 = "NA", w = 400,
  s = 80, f = "mean", scale = "linear", leg = "topleft", col = 1:100,
  max = "default", min = "default", feature = "data points")

Arguments

t

Table of data.

x

Variable to be binned on x-axis.

y

Vector of variables to plot on y-axis.

ys

Scale the y-axis variables first. Defaults to 1.

ystep

Division of steps printed on y-axis scale. Defaults to 0.2.

ylab

Label for Y-axis. Defaults to blank.

axis3

Column of length variable to be plotted on 3rd axis. Defaults to "NA" (not shown).

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 on mean vaue of bin or "bins"=equal spacing between all bins). Defaults to "linear".

leg

Postion of legend. Defaults to "topleft".

col

Vector of colours to use in plots. Defaults to 1:100.

max, min

Minimum and Maximum range of y-axis.

feature

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

Examples

1

swebb1/questplots documentation built on May 26, 2017, 11:08 p.m.