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

format(hms()) should produce an empty character vector #158

Open
kevinushey opened this issue Jan 30, 2025 · 1 comment
Open

format(hms()) should produce an empty character vector #158

kevinushey opened this issue Jan 30, 2025 · 1 comment

Comments

@kevinushey
Copy link

> library(hms)
> format(hms())
[1] "hms()"

This was surprising to me; I think in general the contract for format() is that it produces a character vector of the same length as its input.

@krlmlr
Copy link
Member

krlmlr commented Jan 31, 2025

Thanks. Indeed, this seems true in the vctrs ecosystem (but not for data frames).

format(vctrs::new_list_of())
#> character(0)
format(vctrs::new_vctr(integer()))
#> character(0)
dput(format(data.frame()))
#> structure(list(), names = character(0), row.names = integer(0), class = "data.frame")

Created on 2025-01-31 with reprex v2.1.1

Need to assess the impact on the downstream dependencies.

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

2 participants