View source: R/data_singlevectorformat.R
parse_sleepwake_sequence | R Documentation |
It is common to have sleep wake history information in the form of a binary sequence. This is the format used by SAFTE-FAST and other proprietary software. Further, this format is often easily exported by actigraphy measurement software.
parse_sleepwake_sequence(seq, epoch, series.start)
seq |
A sequence of |
epoch |
Integer expressing length of each observations in the series (minutes). |
series.start |
A POSIXct object indicating the start datetime of the simulation (i.e., pre-first sleep waking duration) |
FIPS_df
formatted dataframe
start_date = as.POSIXct("2018-05-01 10:00:00")
bitvector_sequence = rep(rep(c(1,0), 6), sample(20:40, 12))
FIPSdf_from_bitvec = parse_sleepwake_sequence(
seq = bitvector_sequence,
series.start = start_date,
epoch = 15)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.