op_plot_quality {duet} | R Documentation |
Plot Data Quality (Confidence Ratings or Completeness)
Description
This function plots either the mean confidence ratings, the percentage of completeness (i.e., data present), or both for the given dataframe. It can handle data for one or multiple persons and regions, creating separate panels for each.
Usage
op_plot_quality(df, plot_type = "confidence", threshold_line = 50)
Arguments
df |
A dataframe containing the confidence data, with columns for base_filename, region, person, and confidence values. |
plot_type |
Character. Either "confidence" to plot the mean confidence rating, "completeness" to plot the percentage of completeness, or "both" to plot both. Default is "confidence". |
threshold_line |
Numeric. The value at which to draw a dashed horizontal line. Default is 50. |
Value
A ggplot object or a combined plot if "both" is selected.
Examples
# Example usage:
# Path to example CSV file included with the package
file_path <- system.file("extdata/csv_data/A-B_body_dyad.csv", package = "duet")
# Load the data
data <- read.csv(file_path)
# plot <- op_plot_data_quality(df, plot_type = "both", threshold_line = 75)
# print(plot)
[Package duet version 0.1.1 Index]