plot_long: Plots with-in participant activity intervals (SLEEP, REST,...

Description Usage Arguments Details Value Examples

View source: R/plot_Darwent.r

Description

Plots with-in participant activity intervals (SLEEP, REST, ACTIVE, etc) in 24 hour sections.

Usage

1
2
plot_long(dat, acolor, si, tz = "UTC", tz2, sp = "00:00:00",
  with_date = FALSE, alphas = 1, hourbreaks = 5, ...)

Arguments

dat

a dataframe.

acolor

the color of the lines.

si

defines the size of the geom_segment, 1.25 by default.

tz

the time zone.

tz2

an additional time zone.

sp

the starting point in the x-axis. Set as 00:00:00 by default.

with_date

allows adding the cutpoint date to the y-axis. with_date = FALSE by default.

alphas

is the transparency.

hourbreaks

is the number of labels on the x-axis.

...

Optional parameters.

Details

The date-time data in the data frame dat will keep time zone. The argument tz and tz2 are used to specify the time in the x-axis.

Value

a plot.

Examples

1
2
3
4
5
6
library("dplyr")
data(act)
act[act$subject_ID == 1 & act$interval_type != "ACTIVE",] %>%
plot_long(., si = c(3, 2.5, 2, 1.5),
             tz2 = "Pacific/Auckland",
             acolor = c("#D55E00", "black", "#56B4E9"))

ActisoftR documentation built on Oct. 16, 2018, 5:04 p.m.