Skip to content

Integer64 still remains numeric upon opening with read_fst #267

@markdanese

Description

@markdanese

I apologize in advance for not having a reproducible example but I don't really know how to do it in this situation. Will amend this if I figure something out.
I use write_fst() to save a file that uses integer64 for the person id. When I open the file using read_fst() it comes in as numeric with an 'integer64' label (which I have never seen before. When I look at the file it is all scientific notation. See below for the person_id for the cohort object.

image

However, when I simply run bit64::is.integer64(cohort$person_id) (which returns TRUE) its class immediately becomes integer64 and all is fine. There is no resaving or any changes to the actual files other than this single line of code. See below for the status upon refreshing the view in RStudio:

image

So it seems that when restoring an integer64 file, something isn't quite completing the process to make the variable an integer64. This is all done in a fresh session.

If this should be directed elsewhere, please let me know.

> sessionInfo()
R version 4.1.3 (2022-03-10)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.3

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRlapack.dylib

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

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

other attached packages:
[1] fstcore_0.9.12    fst_0.9.8         data.table_1.14.2

loaded via a namespace (and not attached):
[1] bit_4.0.4        compiler_4.1.3   parallel_4.1.3   tools_4.1.3      Rcpp_1.0.8.3     bit64_4.0.5      cellranger_1.1.0 readxl_1.4.0 

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions