dt_aggregate | R Documentation |
dt_aggregate()
aggregates numeric values to a specified time unit. Columns with
uniform character values are retained (i.e. patient ID, sensor name).
dt_aggregate(
df,
dt_field = NULL,
unit = "5 seconds",
summary_fun = "median",
na_rm = TRUE
)
df |
a data frame with a datetime field. |
dt_field |
character; name of datetime field. |
unit |
character; string specifying a time unit or a multiple of a unit to be rounded |
summary_fun |
character; summary function (i.e. 'mean', 'median'). Default = 'median.' |
na_rm |
logical; should NA values be removed before the chosen
|
## Not run:
dt_aggregate(df,
dt_field = "Date_Time",
unit = "5 seconds",
summary_fun = "median", na_rm = TRUE
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.