Skip to contents

This function calculates counts for different phases and calculates precision and recall for each source based on unique citations and citations dataframe. The phases should be labeled as 'screened' and 'final' (case-insensitive) in the input dataframes. The function will give a warning if these labels are not present in the input dataframes.

Usage

calculate_phase_count(unique_citations, citations, db_colname)

Arguments

unique_citations

A dataframe containing unique citations with phase information. The phase information must be provided in a column named 'cite_label' in the dataframe.

citations

A dataframe containing all citations with phase information. The phase information must be provided in a column named 'cite_label' in the dataframe.

db_colname

The name of the column representing the source database.

Value

A dataframe containing distinct counts, counts for different phases, precision, and recall for each source, as well as totals.

Details

The function will give a warning if 'screened' and 'final' labels are not present in the 'cite_label' column of the input dataframes.