Skip to content

Conversation

@hcirellu
Copy link
Contributor

@hcirellu hcirellu commented Nov 13, 2025

Closes #199

I added coercion methods for Date, POSIXct, POSIXlt, complex, raw and difftime. I also made the methods consistent regarding the keep.names argument.

@MichaelChirico

This comment was marked as outdated.

@MichaelChirico
Copy link
Collaborator

OK, I think this is basically ready to go, thank you!!

Take one last look at my latest edits/comments, should be minor.

@hcirellu
Copy link
Contributor Author

hcirellu commented Jan 6, 2026

I was surprised, that as.difftime.integer64 worked even though the generic as.difftime was not exported anymore. By checking it, I found out, that base::as.difftime automatically converts to double, if the input is numeric. And since is.numeric(integer64) is TRUE, no extra methods are necessary. I kept the tests, so that we are aware if something changes in R.

@MichaelChirico
Copy link
Collaborator

I kept the tests, so that we are aware if something changes in R.

Oh, perfect, thanks!

@MichaelChirico MichaelChirico merged commit 5dc7639 into r-lib:main Jan 6, 2026
10 checks passed
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

Successfully merging this pull request may close these issues.

Add as.complex.integer64

2 participants