Description Usage Arguments Value See Also Examples
View source: R/apply_hour_tags.R
Create a column of date tags based on specified hour ranges (created using inputted starts
) and respective names (tags
).
1 | apply_hour_tags(dataset, starts = input_hour_starts, tags = input_hour_tags)
|
dataset |
The dataset for which to apply the date tags to. |
starts |
Numeric list of start hours (in 24 hour format) |
tags |
Character list of tags |
Dataframe with a new column ("hour_tag") containing the appropriate hour tag with respect to each row's timestamp.
Other miscellaneous functions:
adjust_timezone()
,
ambient_temperature()
,
apply_date_tags()
,
column_dt()
,
filter_df()
,
group_stad()
,
organize_stad()
,
rounding_w_zeroes()
,
unit_convert()
,
wrangle_meta()
1 2 3 4 5 6 7 8 9 10 | apply_hour_tags(
july_frm_diurnal[1:3],
c(5, 12, 17, 21),
c("Morning", "Afternoon", "Evening", "Night")
)
apply_hour_tags(
july_frm_diurnal[1:3],
starts = c(6, 22),
tags = c("Awake", "Asleep")
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.