tsimage: Display Tag Data as an Image

Description Usage Arguments Details Value

View source: R/BAStag.R

Description

Display time series data as an image.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
tsimage(
  date,
  y,
  offset = 0,
  dt = NA,
  xlab = "Date",
  ylab = "Hour",
  xaxt = par("xaxt"),
  ...
)

tsimageLocator(im, n = 512)

Arguments

date

the sequence of sample times as POSIXct.

y

the sequence of responses.

offset

the starting hour for the vertical axis.

dt

the time interval to which the data are resampled (secs).

xlab

the x axis label.

ylab

the y axis label.

xaxt

a character that specifies the x axis type (see par).

...

additional arguments to be passed to image.

im

the axes coordinates returned by tsimage.

n

the number of points to select.

Details

The tsimage function divides a sequence of samples into 24 hour periods, packs these into the columns of a matrix and displays the result as an image. The data are resampled to ensure the time interval between samples is regular and evenly divides the 24 hour period. The time interval to which the data are resampled is selected automatically, or can be specified with the dt argument.

The tsimageLocator function allows the user to select pixels with the mouse pointer in the style of locator, and returns the times corresponding to the selected pixels.

These functions ignore clock drift and assume the sampling period exactly divides 24 hours.

Value

tsimage returns the date and hour coordinates of the image grid. tsimageLocator returns the times corresponding to the selected pixels.


SWotherspoon/BAStag documentation built on March 29, 2021, 2:47 a.m.