getGapStrategyBestParamByScore <- function(dbcon_str, side = "Long",
last_only = FALSE) {
si_de <- side
best_params <- getGapStrategyResults(dbcon_str) %>%
dplyr::filter(side == si_de) %>%
dplyr::group_by(range) %>%
dplyr::filter(score == max(score)) %>%
dplyr::distinct(range, .keep_all = TRUE) %>%
dplyr::arrange(range) %>%
data.table::data.table()
if (last_only) {
result <- best_params[nrow(best_params)]
} else {
result <- best_params
}
return (result)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.