Learn R Programming

DeSciDe (version 1.0.2)

rank_search_results: Rank Search Results

Description

Rank search results based on a chosen method.

Usage

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

Value

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

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

Examples

Run this code
# 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)

Run the code above in your browser using DataLab