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

0.13.0 cannot read large multi-column xts' it created #395

Closed
Gillis opened this issue Mar 9, 2023 · 2 comments
Closed

0.13.0 cannot read large multi-column xts' it created #395

Gillis opened this issue Mar 9, 2023 · 2 comments
Assignees
Labels
Milestone

Comments

@Gillis
Copy link

Gillis commented Mar 9, 2023

broken_xts.zip

Description

xts 0.13.0 unable to read certain xts multi column objects it produces. I upgraded from xts 0.12.1 to 0.13.0 and the code base i have starts crashing. Upon inspection, i notice certain large xts multi column structures lacking named columns created by the code produce errors when accessed in any way. When saving these 0.13.0 structures and loading them up in 0.12.1, they work as expected. Giving all the columns names also "repairs" these structures under 0.13.0.

Expected behavior

Typical xts behavior, for instance print(xts) should print the xts. xts <- xts*xts; should square the values.

However, any sort of operation on this xts leads to the error

print(test)
Error in dimnames(x) <- dn :
length of 'dimnames' [2] not equal to array extent

Minimal, reproducible example

based on the attached and zipped xts object inside an RDS

test <- loadRDS("broken_xts.RDS");
print(tail(test,1))
[broken_xts.zip](https://github.com/joshuaulrich/xts/files/10934787/broken_xts.zip)

Session Info

> sessionInfo()
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows Server x64 (build 14393)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

other attached packages:
[1] xts_0.13.0 zoo_1.8-11

loaded via a namespace (and not attached):
[1] compiler_4.2.2  tools_4.2.2     grid_4.2.2      lattice_0.20-45
@joshuaulrich joshuaulrich self-assigned this Mar 9, 2023
@joshuaulrich joshuaulrich added this to the 0.13.1 milestone Mar 9, 2023
@joshuaulrich
Copy link
Owner

Thanks for the report! I can replicate and will fix.

@joshuaulrich
Copy link
Owner

Fixed in the 'main' branch now and will be in the next release. Thanks again for the report!

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

2 participants