Open matiasandina opened 1 year ago
A preliminary version has been pushed. Please test further. It will create aligned_
versions of the datetime
columns using the specified groups.
df %>%
group_by(FED) %>%
set_alignment(datetime, "time") %>%
ggplot(aes(aligned_datetime, Pellet_Count)) + geom_line(aes(color = FED))
df %>%
group_by(FED) %>%
set_alignment(datetime, "time") %>%
ggplot(aes(datetime, Pellet_Count)) + geom_line(aes(color = FED))
Alignment using method time
will set the minimum time to 00:00:00. This might be desired but it could also be problematic. Consider other alignments:
date
: We go back to the date but keep the time component staticWe should maybe consider adding a way to manually give the zero independent of the method later used for analysis. When you put mice with the FEDs, they will take time before eating, so relying on the min
event is not the best idea to set the zero.
manual
: We use particular datetime(s) for moments (example: experiment started at timestamp X, elapsed from there?)
It's often desirable to align dates. There might be different strategies here to deal with it (i.e., what do we align to? how do we minimize errors with dates? Do we overwrite or create a new column
common_time
)See previous strategies in the python package here