Finding the Mean and SD of time variables, taking times past midnight into account in R
问题 I am trying to figure out how to take the mean and SD of bedtimes, but I am having difficulty managing times after midnight. These concepts make sense logically (I think) but figuring out how to code it in R is tricky. Right now, those pull the mean down toward daytime (i.e., toward noon), when they logically should pull the mean toward nighttime (i.e., toward midnight). Here is an example, where the mean time should be closer to midnight but isn't. library(chron) In.Bed.Date <- c("6/15/2019"