plotAccData: plotAccData

Description Usage Arguments Details Examples

View source: R/plotAccData.R

Description

Creates a plot of the Acc Data given a resolution.

Usage

1
2
plotAccData(x, what = c("sd", "mean", "temperature", "light", "voltage"),
  draw = TRUE, resolution = 200, ...)

Arguments

x

should be an AccData object.

what

What variable to plot against time. Options are:

  1. sd: Standard of movement given the resolutions

  2. mean: Mean of movementgiven the resolutions

  3. temperature

  4. light

  5. voltage

draw

if TRUE, plot a whole new plot. Otherwise, superimpose on to existing plot.

resolution

Resolution of plot to create.

...

resolution of underlying grid.

Details

From the raw data to create a representation of light, temperature and MAGSA (Mean Absolute Gravity Substituted Acceleration).

Creates a line plot at a certain resolution from the GENEAread AccData objects available.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
## AccData = read.bin(datafile) # where data file is a GENEActiv .bin file.
## saveRDS(AccData , "AccData.rds")
x = readRDS(system.file("extdata", "AccData.rds", package = "GENEAsphere"))
plotAccData(x, what = ("sd"))
plotAccData(x, what = ("sd"))
plotAccData(x, what = ("mean"))
plotAccData(x, what = ("temperature"))
plotAccData(x, what = ("light"))
plotAccData(x, what = ("voltage"))

## End(Not run)

Example output

Loading required package: ggplot2
Loading required package: rgl
Loading required package: MASS
Loading required package: misc3d
Loading required package: GENEAread
Loading required package: bitops
Loading required package: mmap
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl.init' failed, running with 'rgl.useNULL = TRUE'. 
3: no DISPLAY variable so Tk is not available 

GENEAsphere documentation built on Dec. 5, 2019, 5:11 p.m.