Count and Precision/Sensitivity Table
Source:R/new_count_and_table.R
create_precision_sensitivity_table.Rd
This function generates a formatted table that displays the precision and sensitivity (recall) metrics for each citation source, along with distinct records and phase-specific counts such as "screened" and "final".
Value
A gt
table object summarizing the precision and sensitivity
metrics for each citation source, with relevant footnotes and labels.
Details
The function first checks whether all values in the screened
column are zero.
If so, the column is removed from the table. The table is then generated
using the gt
package, with labeled columns and footnotes explaining the metrics.
Examples
# Example usage with a sample dataset
sample_data <- data.frame(
Source = c("Source1", "Source2", "Total"),
Distinct_Records = c(100, 150, 250),
final = c(80, 120, 200),
Precision = c(80.0, 80.0, 80.0),
Recall = c(40.0, 60.0, 100.0),
screened = c(90, 140, 230)
)
create_precision_sensitivity_table(sample_data)
Record Counts & Precision/Sensitivity
Distinct Records1
Final Included2
Precision3
Sensitivity/Recall4
Screened Included5
Source1
Source2
Total
1 Number of records after internal source deduplication.
2 Number of citations included after full text screening.
3 Number of final included citations / Number of distinct records.
4 Number of final included citations / Total number of final included citations.
5 Number of citations included after title/abstract screening.
6 Total citations discovered (after internal and cross-source deduplication).
7 Total citations included after full text screening.
8 Overall Precision = Number of final included citations / Total distinct records.
9 Total citations included after Ti/Ab Screening.