| cut_hour | R Documentation |
Supply a numeric variable, e.g. Collaboration_hours, and return a character
vector.
cut_hour(metric, cuts, unit = "hours", lbound = 0, ubound = 100)
metric |
A numeric variable representing hours. |
cuts |
A numeric vector of minimum length 3 to represent the cut points required. The minimum and maximum values provided in the vector are inclusive. |
unit |
String to specify the unit of the labels. Defaults to "hours". |
lbound |
Numeric. Specifies the lower bound (inclusive) value for the minimum label. Defaults to 0. |
ubound |
Numeric. Specifies the upper bound (inclusive) value for the maximum label. Defaults to 100. |
This is used within create_dist() for numeric to categorical conversion.
Character vector representing a converted categorical variable, appended
with the label of the unit. See examples for more information.
Other Support:
camel_clean(),
check_inputs(),
combine_signals(),
extract_date_range(),
extract_hr(),
heat_colours(),
is_date_format(),
maxmin(),
p_test(),
pairwise_count(),
plot_WOE(),
read_preamble(),
rgb2hex(),
totals_bind(),
totals_col(),
totals_reorder(),
tstamp(),
us_to_space(),
wrap()
# Direct use
cut_hour(1:30, cuts = c(15, 20, 25))
# Use on a query
cut_hour(sq_data$Collaboration_hours, cuts = c(10, 15, 20))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.