Skip to contents

This function creates a boxplot for a given test name and cluster, and saves the plot to a specified directory.

Usage

boxplot_cluster_manual(data, test_name, file_name, output_dir)

Arguments

data

A data frame containing the data.

test_name

A character string representing the test name to be plotted.

file_name

A character string representing the file name for saving the plot.

output_dir

A character string representing the directory to save the plot.

Value

None. The function saves the plot to a file.

Examples

set.seed(1)
data <- data.frame(
    cluster = rep(letters[1:2], each = 50),
    test1 = c(stats::rnorm(50, mean = 1, sd = 1), stats::rnorm(50, mean = 2, sd = 1)),
    test2 = stats::rnorm(100, mean = 2, sd = 1)
)
test_name <- "test1"
file_name <- "example"
output_dir <- tempdir()

# Call the boxplot_cluster_manual function
boxplot_cluster_manual(data, test_name, file_name, output_dir)