bin.running: Aggregate Wheel Running Data

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Aggregate Wheel Running Data

Usage

1
2
bin.running(whldat, bin.size, bins.out = "ALL", bin.start = 1,
  start.at.1pm = TRUE, computer, header = NULL)

Arguments

whldat

an n intervals by 157 (computers A-C) or 151 (computer D) column data.frame, most often read in using read.dat.

bin.size

the size (in minutes) of the bins to return. Defaults to 10 minute bins.

bins.out

number of bins to return. Defaults to 'ALL' – Start at the first row and bin all the way to the end of the file, removing an incomplete last bin (if necessary).

bin.start

the interval number where the binning should start. Defaults to 1.

start.at.1pm

logical. if TRUE (default), bin.running will delete all intervals before 1:00 PM.

computer

text string code for which computer recorded whldata.

header

optional text string that can be used to label plots made with plot.running

Details

Given an arbitrary bin size in minutes and an arbitrary interval number from which to start aggregating, bin.running takes a .DAT (comma-separated) or .txt (tab-delimited) wheel running data file read in using read.dat and aggregates wheel revolutions, the maximum interval per bin, the number of intervals per bin with >0 revolutions, and the mean RPM per bin.

Value

bin.running returns an object of class running. This list contains

whlnum

A vector of wheel numbers appropriate for computer

run

Aggregated total revolutions per bin

max

Maximum number of revolutions per interval in a bin

int

Number of intervals in a bin with >0 revolutions

rpm

Mean RPM in a bin

times

data.frame with columns for bin, hour, and minute denoting the time at the beginning of each bin

whldat

Original raw wheel running data

bin.size

Length in minutes of the bins

n.bins

Number of bins into which data was aggregated

bin.start

Interval where binning started

start.at.1pm

logical. If TRUE, all intervals before 1:00 PM were truncated

computer

Computer from which the data were recorded

header

Optional text string header identifying the data

Author(s)

Kevin Middleton (middletonk@missouri.edu)

See Also

read.dat, plot.running

Examples

1
2
3
4
5
6
7
8
# Load the 2006-11-05 running data for computer A
data(A061105)

# Aggregate running data into 20 minute bins
A.aggr <- bin.running(A061105, computer = "A", bin.size = 20)

# Plot aggregated running data for wheel number 1.
plot(A.aggr, whlnum = 1, whichplot = "run")

kmiddleton/binning documentation built on May 20, 2019, 12:51 p.m.