Add validation checking on column and length arguments
ha0ye opened this issue · 1 comments
ha0ye commented
The core C++ code will crash when trying to access memory that it doesn't have, such as columns beyond the limits of a matrix or values past the end of a vector.
We can add some simple checks to the R wrappers to check for these to produce an error that won't crash RStudio.
One MRE:
dat <- rnorm(83)
pred <- c(43, 83)
lib <- c(1, 42)
crash_out <- simplex(dat, lib, pred, tau = 1:10)