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

difftime construction fails with pre-appended class #521

Closed
ashbaldry opened this issue Jan 29, 2025 · 1 comment · Fixed by #522
Closed

difftime construction fails with pre-appended class #521

ashbaldry opened this issue Jan 29, 2025 · 1 comment · Fixed by #522

Comments

@ashbaldry
Copy link

There seems to be an error for constructing a difftime object when there is a class prior to it.

x <- structure(
  c(
    NA, 74269, 39024, 64597, 24937, NA, NA, 50690, 19113,
    10261, 44113, 17768, 8178, 86191, 22670, 1324, 55435, 5775, 4278
  ),
  class = c("hms", "difftime"),
  units = "secs"
)
constructive::construct(x)
Error in `constructive::construct()`:
! {constructive} could not build the requested code.
Caused by error in `if (protect && (mode == "symbol" || (mode == "name" && !uses_u))) ...`:
! missing value where TRUE/FALSE needed
@moodymudskipper
Copy link
Collaborator

Thanks a lot, this was not diff time specific but a more general issue in attribute repair, I'm glad you spotted this.

@aviator-app aviator-app bot closed this as completed in #522 Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants