-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gsGOC: NAs introduced by coercion #14
Comments
I think this is a real error. I tracked it to line 321 of the code (the GitHub version). This line throws the warning: V(componentGraph)$totalPatchArea <- as.numeric(unlist(sapply(sourcePatchId, function(x)
sum(patchAreaLookup[patchAreaLookup[, 1] %in% as.numeric(x), 2])))) I am not sure, but I think it is because the patchAreaLookup table produced at line 317 contains three columns of identical values, This suggests that the attributes patchArea.value, patchEdgeArea.value and coreArea.value are not being passed correctly to the gsMPG object. It looks like these all contain patchId numbers rather than areas. So at the very least patchAreaLookup is wrong, and this might be the key to figuring out why the warning is being thrown. |
I think I just resolved this. There were two problems. The patchAreaLookup was not using the .count value. The second was the one that was throwing the warning was the strsplit(x..) bit that appears for the other variables was somehow omitted. It now runs without warnings. I "committed" this change using the online editor in GitHub. Hope this okay. Can you confirm that I have fixed what was probably just a code conversion typo. |
That's great! i had encountered the .count / .value issue previously and clearly forgot to follow through with my updates in that function. Thanks for resolving. |
The following reprex shows the problem:
The text was updated successfully, but these errors were encountered: