Closed aldaniello closed 6 years ago
Hello, Thank you for this issue! I have been able to reproduce this error.
@matthewravery ,the reason this is occurring is because some methods have this block of code at the end
if(is.null(tb[[yhatName]]))
tb[[yhatName]] <- out[, 1]
if (is.null(tb[[names[1]]]))
tb[[names[1]]] <- out[, 2]
if (is.null(tb[[names[2]]]))
tb[[names[2]]] <- out[, 3]
The issue only occurred in two functions. It's been fixed.
If I run: test <- add_ci(test, testModel, alpha = 0.1, names = c(“LCB”, “UCB”)) test$pred <- NA test$LCB <- NA test$UCB <- NA
THEN: newDF <- add_ci(test, testModel, alpha = 0.1, names = c(“LCB”, “UCB”)) -or - test <- add_ci(test, testModel, alpha = 0.1, names = c(“LCB”, “UCB”))
Both the newDF and test dataframes come up with the columns still set to NA. This occurs with values in the columns too, not only after setting the columns to NA. It does not always occur on the first attempt, but once it occurs it continues to occur.