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

.doByLabels doesn't preserve order #19

Closed
sgibb opened this issue Apr 15, 2013 · 0 comments
Closed

.doByLabels doesn't preserve order #19

sgibb opened this issue Apr 15, 2013 · 0 comments
Assignees
Labels
Milestone

Comments

@sgibb
Copy link
Owner

sgibb commented Apr 15, 2013

To reproduce:

library("MALDIquant")

s <- c(createMassPeaks(1:4, rep(1, 4), metaData=list(name=33)),
       createMassPeaks(1:4, rep(1, 4), metaData=list(name=33)),
       createMassPeaks(1:4, rep(1, 4), metaData=list(name=22)),
       createMassPeaks(1:4, rep(1, 4), metaData=list(name=22)),
       createMassPeaks(1:4, rep(1, 4), metaData=list(name=34)),
       createMassPeaks(1:4, rep(1, 4), metaData=list(name=34)))

f <- factor(rep(c(33, 22, 34), each=2))

p <- mergeMassPeaks(s, f)

sapply(p, function(x)metaData(x)$name)
## order is 22 33 44 instead of 33, 22, 34
@ghost ghost assigned sgibb Apr 15, 2013
sgibb added a commit that referenced this issue Apr 16, 2013
@sgibb sgibb closed this as completed in 429298c Apr 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant