rossellhayes / fracture

Convert decimals to fractions in R
https://fracture.rossellhayes.com/
Other
23 stars 2 forks source link

Implement as vctrs record class? #17

Open cynthiahqy opened 4 months ago

cynthiahqy commented 4 months ago

Have you considered/would you be open to a contribution that implements vectors of fractions as a vctrs record vector rather than a character vector? Something akin to this example: https://vctrs.r-lib.org/articles/s3-vector.html#rational-class

I need tibble-friendly symbolic representation of fractions for some other work, and I would prefer to keep it in a separate package. I could make another package, but {fracture} seems like a good home for it (and you've got a cool hex sticker!)

rossellhayes commented 4 months ago

Hi @cynthiahqy, that sounds like a great idea to me. I won't have time to work on this immediately, but would be happy to look at a PR if you have the chance to put something together sooner.