View source: R/pubmed_functions.R
rank_search_results | R Documentation |
Rank search results based on a chosen method.
rank_search_results(data, terms_list, rank_method = "weighted")
data |
A data frame containing search results. |
terms_list |
A list of search terms. |
rank_method |
The method to rank pubmed results, either "weighted" or "total". Weighted ranks results based on order of terms inputted. Total ranks results on total sum of publications across all search term combinations. Defaults to "weighted". |
A data frame with ranked search results, which includes the genes and their corresponding ranks based on the search method.
# Example data frame
data <- data.frame(Gene = c("Gene1", "Gene2"),
Term1 = c(10, 20),
Term2 = c(5, 15))
terms_list <- c("Term1", "Term2")
ranked_results <- rank_search_results(data, terms_list, rank_method = "weighted")
print(ranked_results)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.