time_at_events | R Documentation |
helpers for sfn_metrics
max_time(x, time)
min_time(x, time)
x |
a numeric vector, usually a variable in the sapflow or environmental data. |
time |
a POSIXct or character vector with the TIMESTAMP values |
These helper functions return the TIMESTAMP value at which the maximum value for other variable occurs. It is designed to be used inside a dplyr summarise statement.
a single value (POSIXct) with the TIMESTAMP value.
max_time()
: helper for sfn_metrics
min_time()
: helper for sfn_metrics
library(dplyr)
storms %>%
group_by(year) %>%
summarise(wind_max = max(wind),
hour_at_max = sapfluxnetr:::max_time(wind, time = hour),
wind_min = min(wind),
hour_at_min = sapfluxnetr:::min_time(wind, time = hour))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.