R/dplyr_summarizers.R

Defines functions .unique_as_list .table_sorted_from_list .table_sorted

.table_sorted <- function(semtype_vec) {
    semtypes <- stringr::str_split(semtype_vec, ",") %>% unlist()
    tab <- sort(table(semtypes), decreasing = TRUE)
    list(tab)
}

.table_sorted_from_list <- function(l) {
    result <- l %>% unlist() %>% table() %>% sort(decreasing = TRUE)
    list(result)
}

.unique_as_list <- function(x) {
    list(unique(x))
}

Try the rsemmed package in your browser

Any scripts or data that you put into this service are public.

rsemmed documentation built on Nov. 8, 2020, 5:32 p.m.