Learn R Programming

GENEAread (version 1.1.1)

AccData: Methods for processing and summarising AccData.

Description

A variety of functions and methods for handling processed AccData.

Usage

"["(x, i=1:dim(x$data.out)[1], j=NULL, drop=TRUE) "$"(x, name) "print"(x, ...) "summary"(object, ...) "plot"(x, y=NULL, what = c("sd", "mean", "temperature", "light", "voltage"),draw = TRUE, resolution = 200,...)

Arguments

x, object
"AccData" object to process.
i,j
Coordinates for matrix like manipulation.
drop
logical. Coerce to vector if one dimensional?
name
list field to extract.
y
Optional variable to plot as y-axis.
what
Type of plot to create.
draw
logical. Whether to plot output.
resolution
Approximate number of time steps to plot.
...
Additional arguments to pass to default methods.

Details

These functions allow access and manipulation of AccData class objects.

[ allows matrix style manipulations. If the first column (the timestamp column) is included, a data.frame is produced with the timestamp as a "GRtime" object via convert.time. This allows improved plotting of time axes. If j is not specified, an "AccData" object is returned.

$ allow list style manipulations. In addition to the internal components of "AccData" objects (see read.bin), a number of keywords are recognised:

"time": Timestamp "x","y","z": x, y and z accelerometer components "xyz": The three accelerometer components together "temperature" "button" "voltage" "light" "svm": Sum of vector magnitudes

print and summary both provide useful summaries of the data. Summary returns invisibly an object representation of its output in list format - in particular, it gives summary statistics of epochal standard deviations on a 10 second epoch.

Finally, plot provides a range of useful summary plots, depending on the specification of what. To reduce computational requirements, epochs and so on are chosen or downsampling done so that a maximum of around 100 time points are plotted. If plot is called with a specified y, x is considered as its vector of timestamps. If draw = FALSE, plot produces no side effects but instead returns the object that would have been plotted.

See Also

header.info, epoch.apply, get.intervals

Examples

Run this code

binfile  = system.file("binfile/TESTfile.bin", package = "GENEAread")[1]

#Read in the entire file, calibrated
procfile<-read.bin(binfile)

print(procfile)
summary(procfile)

plot(procfile$temperature)
plot(procfile[,c(1,7)])

Run the code above in your browser using DataLab