# NOT RUN {
dt_one_animal <- toy_ethoscope_data(seed=2)
####### Ethoscope, corrected velocity classification #########
sleep_dt <- sleep_annotation(dt_one_animal, masking_duration=0)
print(sleep_dt)
# We could make a sleep `barecode'
# }
# NOT RUN {
library(ggplot2)
ggplot(sleep_dt, aes(t,y="Animal 1",fill=asleep)) +
geom_tile() + scale_x_time()
# }
# NOT RUN {
####### Ethoscope, virutal beam cross classification #########
sleep_dt2 <- sleep_annotation(dt_one_animal,
motion_detector_FUN=virtual_beam_cross_detector)
# }
# NOT RUN {
library(ggplot2)
ggplot(sleep_dt2, aes(t,y="Animal 1",fill=asleep)) +
geom_tile() + scale_x_time()
# }
# NOT RUN {
####### DAM data, de facto beam cross classification ######
dt_one_animal <- toy_dam_data(seed=7)
sleep_dt <- sleep_dam_annotation(dt_one_animal)
# }
# NOT RUN {
library(ggplot2)
ggplot(sleep_dt, aes(t,y="Animal 1",fill=asleep)) +
geom_tile() + scale_x_time()
# }
Run the code above in your browser using DataLab