Error in sample.int(length(x), size, replace, prob) : cannot take a sample larger than the population when 'replace = FALSE'
When running random forests with equalize = T Probably due to cases when the presences outnumber the absences, so equalize cannot sample correctly.
I get the same error running Random Forest and BRT. When "equalize= False" BRT works to the end , but RF give me another error:
"Error in randomForest.default(x, y, mtry = mtryStart, ntree = ntreeTry, : NA not permitted in predictors In addition: Warning message: In randomForest.default(x, y, mtry = mtryStart, ntree = ntreeTry, : The response has five or fewer unique values. Are you sure you want to do regression?"
I have a datase with 1178 final poitns with 1000 pseudoabsences
@Tai-Rocha isto não parece relacionado com a issue, mas com as camadas preditoras que você está usando, pois na seleção de pseudoausências você está obtendo NAs em alguma delas. se você limpou por fora ainda há "buracos" no stack, ou você rodou sem clean = T, pois as funções já controlam isto.