keys_near.tbl_ts | R Documentation |
Return keys nearest to a given statistics or summary.
## S3 method for class 'tbl_ts'
keys_near(.data, var, top_n = 1, funs = l_five_num, stat_as_factor = TRUE, ...)
.data |
tsibble |
var |
variable to summarise |
top_n |
top number of closest observations to return - default is 1, which will also return ties. |
funs |
named list of functions to summarise by. Default is a given
list of the five number summary, |
stat_as_factor |
coerce |
... |
extra arguments to pass to |
# Return observations closest to the five number summary of height_cm
heights %>%
keys_near(var = height_cm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.