Learn R Programming

ActisoftR (version 0.0.2)

sheep_counter: Sheep counter

Description

Computes the empirical probability that a group or an individual are sleeping at a given time of the day.

Usage

sheep_counter(dat, tz = "UTC", interv = "10 mins", datebreaks = "2 hour",
  work_data)

Arguments

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.

Value

a plot.

Examples

Run this code
# NOT RUN {
# 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)

# }

Run the code above in your browser using DataLab