Skip to content

Commit 8f07b13

Browse files
author
Karin Schork
committed
fix order of columns fpr valid value plot
1 parent 5cb801b commit 8f07b13

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

R/workflow_QC.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ workflow_QC <- function(data_path,
143143
vv_plot_data <- ValidValuePlot(D_long = prepared_data[["D_long"]],
144144
use_groups = use_groups, groupvar_name = groupvar_name, group_colours = group_colours,
145145
base_size = base_size)
146+
#### reorder valid values table to stay in the same order as the original data ####
147+
cnames <- colnames(prepared_data$D)
148+
vv_plot_data$table$name <- factor(vv_plot_data$table$name, levels = cnames)
149+
vv_plot_data$table <- vv_plot_data$table[order(vv_plot_data$table$name),]
146150

147151
mess <- paste0(mess, vv_plot_data[["message"]])
148152

0 commit comments

Comments
 (0)