Description Usage Arguments Value Examples
View source: R/sheep_counter.r
Computes the empirical probability that a group or an individual are sleeping at a given time of the day.
1 2 | sheep_counter(dat, tz = "UTC", interv = "10 mins", datebreaks = "2 hour",
work_data)
|
dat |
a data frame. |
tz |
the time zone. |
interv |
interval of time, set as 10min. |
datebreaks |
is the distance between breaks in the x-axis. "2 hour" by default. |
work_data |
optional parameter used to import work data. |
a plot.
1 2 3 4 5 | # Example 1:
data(act)
# Prob of being sleeping for ID 1 during the baseline sleep
b <- act[act$subject_ID==1 & act$datime_end < as.POSIXct("2017-12-15 00:00:00", tz = "UTC"),]
sheep_counter(b)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.