Closed KristianNelson closed 4 years ago
@crvernon
Error in uniroot(function(x) target_function(fraction, x, coords, ply, : f() values at end points not of opposite sign In addition: Warning messages: 1: In if (is.na(f.lower)) stop("f.lower = f(lower) is NA") : the condition has length > 1 and only the first element will be used 2: In if (is.na(f.upper)) stop("f.upper = f(upper) is NA") : the condition has length > 1 and only the first element will be used Called from: uniroot(function(x) target_function(fraction, x, coords, ply, total_area), lower = coords$xmin_source, upper = coords$xmax_source)
This is the same error we were getting earlier on, and we fixed it by changing cbind
to rbind
, and I can't figure out why it is happening again.
@KristianNelson do you think it may be due to trying to evaluate multiple polygons? Does Rochester and/or Syracuse have multiple watersheds? Our initial tests were on single polygon watersheds.
@crvernon They are single watershed cities, which is why it's so odd.
This was resolved when we stopped using the splice function and instead did analysis on single watersheds.
@KristianNelson @swd-turner Can you post the error message you are getting?