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

findMatches doesn't work correctly for DataFrames #59

Open
LTLA opened this issue Jan 12, 2020 · 0 comments
Open

findMatches doesn't work correctly for DataFrames #59

LTLA opened this issue Jan 12, 2020 · 0 comments

Comments

@LTLA
Copy link
Contributor

LTLA commented Jan 12, 2020

Consider the following:

library(S4Vectors)
a <- DataFrame(A=LETTERS)
b <- a[5:1,,drop=FALSE]
match(b, a) # gives me 5:1, so far so good.
findMatches(b, a)
## Error in .Call2("Hits_new", Class, from, to, nLnode, nRnode, revmap_envir,  : 
##   'to(hits)' must contain non-NA values >= 1 and <= 'nRnode(hits)'
countMatches(b, a)
## [1]  1 NA NA NA NA

If I had to guess, probably these two invocations are trying to call some kind of List method rather than using DF's match method.

Session info
R Under development (unstable) (2019-10-31 r77342)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.3 LTS

Matrix products: default
BLAS:   /home/luna/Software/R/trunk/lib/libRblas.so
LAPACK: /home/luna/Software/R/trunk/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] parallel  stats4    stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
[1] S4Vectors_0.25.8    BiocGenerics_0.33.0

loaded via a namespace (and not attached):
[1] compiler_4.0.0
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

1 participant