Description Usage Arguments Value Examples
This function is used by the Darwent plot
1 2 | home.night.shade(x, shadow.start = "20:00:00", shadow.end = "06:00:00",
homeTZ, tz = "UTC", ...)
|
x |
a dataframe |
shadow.start |
starting time of the home night, 22:00:00 by defaults |
shadow.end |
ending time of the home night, 08:00:00 by defaults |
homeTZ |
participant's home time zone. A data frame containing for each participant corresponding home time zone. |
tz |
is the time zone |
... |
Optional parameters |
a dataframe
1 2 3 4 5 6 7 8 9 10 11 | library("dplyr")
library("lubridate")
data(act)
dat <- act %>% group_by(subject_ID) %>%
mutate(start = min(datime_start)) %>%
ungroup %>% filter(datime_start <= start + lubridate::days(5),
subject_ID == 1, interval_type != "ACTIVE")
homeTZ = data.frame(subject_ID = "1",
TZ = "Pacific/Auckland", stringsAsFactors = FALSE)
home.night.shade(dat, shadow.start = "20:00:00", shadow.end = "06:00:00",
homeTZ = homeTZ)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.