# NOT RUN {
# Fetch the error from the diffQ function
require(MBmca)
# In the following the approximate derivative of the amplification curve data
# x <- RAS002[, 1] and y <- RAS002[, 2] is calculated by diffQ().
# This will not give an error.
x <- RAS002[, 1]
y <- RAS002[, 2]
armor_diffQ_passes <- armor(MBmca::diffQ(cbind(x, y), verbose = TRUE)$xy)
armor_diffQ_passes
#
# In the following the approximate derivative of the sequences x <- 1:40
# and y <- 1:40 is calculated by diffQ(). However, this will fail.
# This will give the "internal" error
# >
# Error in list.res[[i]][[8]] : subscript out of bounds
# that is resolved to 0.
x <- 1:40
y <- 1:40
armor_diffQ_fails <- armor(MBmca::diffQ(cbind(x, y), verbose = TRUE)$xy)
armor_diffQ_fails
# }
Run the code above in your browser using DataLab