Creating 'tibble classes'

oo
tibble

#1

I’m trying to normalize tabular data from various sources to ensure that from each source at least some columns are present and have the correct type, and some other assertions (for instance, weights add up to 1). Does anyone have thoughts on how to accomplish this?

Initially, I was thinking of taking an OO approach, such as creating a class, but in my mind I keep going back to wanting a ‘standardized’ tibble. I’ve had thoughts on how to handle this (maybe just make it an S3 object?) but I’m open to anything that makes sense.

Any thoughts on this would be appreciated.


#2

I think this thread will be interesting to you: