You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additional checks: set lower and upper values in the assert_numeric statement for p_neigh and p_empty; check neighborhood contains the accepted values; check proportions sums to 1.
Note on the last one - it's important because if proportions do not sum to 1, then the remaining cells are assigned to class 0, meaning that proportions = c(0.1, 0.1, 0.1) would result in a landscape with 80% class 0 and 10% the other two.
Because the categories are integers, it doesn't make sense to rescale the raster for this function. I would suggest defaulting to FALSE or getting rid of the option altogether.
rev(proportions) on line 91 means that the proportions are assigned to the categories backwards. e.g. nlm_neigh(ncol = 50, nrow = 50, p_neigh = 0.5, p_empty = 0.5, categories = 2, proportions = c(0.75, 0.25)) will result in a landscape where 25% is assigned to 0 and 75% to 1. This could be confusing when the proportions are closer.
The text was updated successfully, but these errors were encountered:
ropensci/software-review#188 (comment):
Additional checks: set lower and upper values in the assert_numeric statement for p_neigh and p_empty; check neighborhood contains the accepted values; check proportions sums to 1.
Note on the last one - it's important because if proportions do not sum to 1, then the remaining cells are assigned to class 0, meaning that proportions = c(0.1, 0.1, 0.1) would result in a landscape with 80% class 0 and 10% the other two.
Because the categories are integers, it doesn't make sense to rescale the raster for this function. I would suggest defaulting to FALSE or getting rid of the option altogether.
rev(proportions) on line 91 means that the proportions are assigned to the categories backwards. e.g. nlm_neigh(ncol = 50, nrow = 50, p_neigh = 0.5, p_empty = 0.5, categories = 2, proportions = c(0.75, 0.25)) will result in a landscape where 25% is assigned to 0 and 75% to 1. This could be confusing when the proportions are closer.
The text was updated successfully, but these errors were encountered: