Description Usage Arguments Value Examples
SUPPORTER function: Required for add_daynight function This function supports the add_daynight function by creating a function called is_daynight. It first extracts the hour value from a colon-separated 'character' or 'factor' value. Then it checks to see if the hour value is above or below 12. If it is above 12, then it will print "night", if it is less, it will print "day"
1 |
t |
character or factor |
dataframe
1 2 3 4 5 6 | a <- "12:30:12"
b <- "4:40:50"
is_day_night(a)
## "night"
is_day_night(b)
## "day"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.