#' dplyr equivalent to which
#'
#' @param data dataframe
#' @param conditions logical vector
#'
#' @return numeric vector of indices satisfying conditions
#' @export
#'
GetIndex <- function(data,conditions){
data %>% tibble::rownames_to_column() %>%
filter(conditions) %>% `[[`("rowname") %>% as.numeric()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.