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

droplevels on Factor produces warning #125

Open
MalteThodberg opened this issue Jul 12, 2024 · 0 comments
Open

droplevels on Factor produces warning #125

MalteThodberg opened this issue Jul 12, 2024 · 0 comments

Comments

@MalteThodberg
Copy link

The new raw-based Factors are great!

However, the droplevels method produces a warning. Here's an example using the man page for Factor:

library(IRanges)
set.seed(123)
ir0 <- IRanges(sample(5, 8, replace=TRUE), width=10,
               names=letters[1:8], ID=paste0("ID", 1:8))

## Use explicit levels:
ir1 <- IRanges(1:6, width=10)
F1 <- Factor(ir0, levels=ir1)
droplevels(F1)

Gives the warning:

Warning message:
In storage.mode(index) <- "raw" :
  out-of-range values treated as 0 in coercion to raw

Session info for reference:

R version 4.4.1 (2024-06-14)
Platform: aarch64-apple-darwin20
Running under: macOS Sonoma 14.5

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Europe/Copenhagen
tzcode source: internal

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

other attached packages:
[1] IRanges_2.38.1      S4Vectors_0.42.1    BiocGenerics_0.50.0

loaded via a namespace (and not attached):
[1] BiocManager_1.30.23 compiler_4.4.1      cli_3.6.3           tools_4.4.1        
[5] rstudioapi_0.16.0   pkgload_1.4.0       rlang_1.1.4
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