Skip to content

Commit 3282004

Browse files
committed
bugfixes
1 parent 12373a1 commit 3282004

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

R/05_writing_results.R

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ assemble_results <- function(X,
133133
substance = rep(substance, nrow(X)),
134134
concentration = X$Concentration,
135135
measurement = X$Measurement,
136-
removed_while_cleaning = !(X$Concentration %in% concentrations_after_cleaning),
136+
removed_while_cleaning = !(X$Concentration %in% concentrations_after_cleaning) |
137+
is.na(X$Measurement) | X$Measurement == 0 | X$Concentration == 0,
137138
percentage_bias = NA,
138139
response_factor = NA,
139140
RF_within_thres = NA,
@@ -142,6 +143,10 @@ assemble_results <- function(X,
142143
rownames(result_table_obs) <- NULL
143144

144145
## result only for concentrations that were not removed during cleaning:
146+
147+
resFacDataV2 <<- resFacDataV
148+
result_table_obs2 <<- result_table_obs
149+
145150
result_table_obs$response_factor[!result_table_obs$removed_while_cleaning] <- unlist(resFacDataV)
146151
result_table_obs$RF_within_thres <- result_table_obs$response_factor <= hLineUpper & result_table_obs$response_factor >= hLineLow
147152

R/NEW_06_plotting.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ plotCalibraCurve <- function(RES,
157157
if (show_data_points) {
158158
pl <- pl +
159159
ggplot2::geom_point(size = 1.7, color = point_colour) +
160-
ggplot2::scale_alpha_manual(labels = c("No", "Yes"), values = c("Yes" = 1, "No" = 0.1), name = "Linear range") #+
161-
#ggplot2::facet_wrap(substance ~., scales = multiplot_scales, nrow = multiplot_nrow, ncol = multiplot_ncol)
160+
ggplot2::scale_alpha_manual(labels = c("No", "Yes"), values = c("Yes" = 1, "No" = 0.1), name = "Linear range") +
161+
ggplot2::facet_wrap(substance ~., scales = multiplot_scales, nrow = multiplot_nrow, ncol = multiplot_ncol)
162162
}
163163

164164
### add calibration curve

0 commit comments

Comments
 (0)