View source: R/model_bedtimes.R
relativizer | R Documentation |
permutes circadian fingerprint from 1st column as midnight to 1st col as 8 hrs before bed
relativizer(bins_matrix, bedtime)
bins_matrix |
for each user, 96 columns represent posting frequency in each 15 min interval |
bedtime |
a single numerical bedtime in hours after midnight |
bedtime-relativezed bins_matrix, where column 1 is 8 hours before bedtime
my_timestamps <- data.frame(author=c(1,1,2,2), created_utc=1.6*10^9+c(0,1000,2000,3000)) my_bedtimes <- data.frame(author=c(1,2), nightbed=c(-1,-1)) my_timezones <- create_dummy_timezones(my_timestamps) my_bins <- time_of_day_binner(assign_time_of_day(my_timestamps, my_timezones)) relativizer(my_bins[,2:97], -1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.