categorize.Rd
Categorize recording data based on dates/times
categorize(data, category.name, start.date, end.date, start.time, end.time)
data | Selection data.frame. |
---|---|
category.name | String of what you want to call your category. Example: "Early Morning". |
start.date | Start date for given category. Defaults to min date. Accepts multiple inputs including column name of a calculated field. Has to be numeric yday, string in "YYYY-MM-DD" format, Date format, or POSIXct. |
end.date | End date for given category. Defaults to max date. Accepts multiple inputs including column name of a calculated field. Has to be numeric yday, string in "YYYY-MM-DD" format, Date format, or POSIXct. |
start.time | Start time for a given category. Defaults to min time. Accepts multiple inputs including column name of a calculated field. Has to be a string in "hh:mm:ss" format, hms format, or POSIXct. |
end.time | End time for a given category. Defaults to max time. Accepts multiple inputs including column name of a calculated field. Has to be a string in "hh:mm:ss" format, hms format, or POSIXct. |
A data.frame with a category column of defined categories.
data %>% dplyr::group_by(location) %>% dplyr::mutate(category=NA) %>% categorize("EN","2017-16-01","2017-16-15","22:00:00","23:59:00")