The function plots a Levey-Jennings chart for the given analyte in the list of plates. The Levey-Jennings chart is a graphical representation of the data that enables the detection of outliers and trends. It is a quality control tool that is widely used in the laboratories across the world.
plot_levey_jennings(
list_of_plates,
analyte_name,
dilution = "1/400",
sd_lines = c(1.96),
data_type = "Median"
)
A ggplot object with the Levey-Jennings chart
A list of plate objects for which to plot the Levey-Jennings chart
(character(1)
) the analyte for which to plot the
Levey-Jennings chart
(character(1)
) the dilution for which to plot the
Levey-Jennings chart. The default is "1/400"
(numeric
) the vector of coefficients for the
standard deviation lines to plot, for example, c(1.96, 2.58)
will plot four horizontal lines: mean +/- 1.96sd, mean +/- 2.58sd
default is c(1.96) which will plot two lines mean +/- 1.96*sd
(character(1)
) the type of data used plot. The default is "Median"
# creating temporary directory for the example
output_dir <- tempdir(check = TRUE)
dir_with_luminex_files <- system.file("extdata", "multiplate_reallife_reduced",
package = "SerolyzeR", mustWork = TRUE
)
list_of_plates <- process_dir(dir_with_luminex_files,
return_plates = TRUE, format = "xPONENT", output_dir = output_dir
)
list_of_plates <- rep(list_of_plates, 10) # since we have only 3 plates i will repeat them 10 times
plot_levey_jennings(list_of_plates, "ME", dilution = "1/400", sd_lines = c(0.5, 1, 1.96, 2.58))
Run the code above in your browser using DataLab