Skip to content
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

need a sort of unique(kNNnames) in loadKNNspeciesLayers #10

Closed
ianmseddy opened this issue Mar 14, 2019 · 5 comments
Closed

need a sort of unique(kNNnames) in loadKNNspeciesLayers #10

ianmseddy opened this issue Mar 14, 2019 · 5 comments
Assignees

Comments

@ianmseddy
Copy link
Contributor

ianmseddy commented Mar 14, 2019

Line 413 needs to be sorted first or it may potentially mix up species:

names(speciesLayers) <- unique(kNNnames)

but should be something like

names(speciesLayers) <- sort(unique(kNNnames))
@CeresBarros CeresBarros self-assigned this Mar 14, 2019
achubaty added a commit to ianmseddy/LandR that referenced this issue Mar 26, 2019
@achubaty
Copy link
Contributor

we need to verify the correct behaviour and ensure that sorting matches the order of the layers. this change should definitely be accompanied by unit tests that verify the behaviour.

achubaty added a commit that referenced this issue Mar 26, 2019
@achubaty
Copy link
Contributor

from Tati:

use the .sort...() for consistency among OS

@achubaty
Copy link
Contributor

any updates on this?

@CeresBarros
Copy link
Member

No clue, but presumably it's been fixed?

@achubaty
Copy link
Contributor

achubaty commented May 9, 2024

this looks fixed in branch:

  correctOrder <- sapply(unique(kNNnames), function(x) grep(pattern = x, x = targetFiles, value = TRUE))
  names(speciesLayers) <- names(correctOrder)[match(correctOrder, targetFiles)]

@achubaty achubaty closed this as completed May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants