rank_search_results: Rank Search Results

View source: R/pubmed_functions.R

rank_search_resultsR Documentation

Rank Search Results

Description

Rank search results based on a chosen method.

Usage

rank_search_results(data, terms_list, rank_method = "weighted")

Arguments

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".

Value

A data frame with ranked search results, which includes the genes and their corresponding ranks based on the search method.

Examples

# 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)

DeSciDe documentation built on Sept. 1, 2025, 1:08 a.m.