-
Notifications
You must be signed in to change notification settings - Fork 9
Description
With some PCR curves, the pcrfit_single function calculates for the variable res_fit_model_reverse a value with a length > 1. This variable is then checked against the value "l0" (line 538 of pcrfit_single.R).
The problem is that, starting from R v4.2.0, calling if() statements with a condition of length greater than one gives an error, rather than a warning which was the default behavior before R v4.2.0.
The problem can be reproduced by simply calling the pcrfit_single function on the following curve:
x <- c(18975.1402312078, 18800.5240938434, 18739.5621973758, 18725.2913182794, 18710.7069621781, 18689.2350578204, 18686.8638901042, 18661.8727695653, 18680.247244374, 18667.9736595522, 18669.5549575143, 18686.9959402315, 18708.4507383602, 18708.5475436416, 18727.8006524562, 18760.6828469358, 18781.5755535423, 18778.5338978609, 18790.998381549, 18799.8236712898, 18827.6789091557, 18842.8976295566, 18893.0134817481, 18896.6848441745, 18927.8771982871, 18952.4176915254, 18974.7589453346, 19036.915468283, 19081.699380633, 19177.5611890487, 19264.8667027727, 19350.3861811587, 19439.0793431537, 19541.5295107311, 19664.8999316732, 19789.5937998043, 19932.2225799051, 20101.4832584795, 20269.8000004043, 20466.8669258831, 20684.3702883397, 20908.1757290417, 21124.4397444143, 21336.2726160735, 21571.6445730875, 21807.2158417692, 22063.9529265485, 22315.974400032, 22590.6565166396, 22841.8995913344)
(in this case, the value obtained for res_fit_model_reverse is in fact "l6" "l7").
I'm running PCRedux_1.1-2 on R v4.2.1 (OS: Windows 11).