prettyunits icon indicating copy to clipboard operation
prettyunits copied to clipboard

S3 Classes with format and print?

Open krlmlr opened this issue 9 years ago • 5 comments

For instance:

dput(pretty_bytes(1000))
> structure(1000, class = "pretty_bytes")
print(pretty_bytes(1000))
> [1] "1 kB"

Would you support this kind of functionality? It might break compatibility, but then there are not many revdeps (yet) ;-)

krlmlr avatar Jun 11 '15 13:06 krlmlr