I am trying to get a loop to run. I want to obtain HC5 estimates for an SSD using µ and sigma values from a dataset. When i run the loop it only works until the 1638th value and shows the following error:
Error in seq.default(min(xdata) - 1.5 * step, max(xdata) + 1.5 * step, : 'from' must be a finite number In addition: Warning message: In base::min(x, ..., na.rm = na.rm) : no non-missing arguments to min; returning Inf
I tried this code:
for (i in 1:2000) {
print(i)
val1 <- mosaic::qdist("lnorm", p = 0.05,
meanlog = dump[i]$mu_ac,
sdlog = dump[i]$sigma_ac, plot = FALSE
)
dump[i, hc5_ac := val1]
}
I get the right HC5 values up until a certain point where it just stops. I already checked if data was missing but this is not the case.
New contributor
user25504485 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1