Closed etiennebacher closed 4 months ago
I recommend that you look into the implementation of the arrow package. For example: https://github.com/apache/arrow/blob/d9891918a42c74002533ed5c06c42b7d0d070820/r/R/dplyr-filter.R#L21-L86
It works simply by having the return value of the S3 methods be the class.
filter.ArrowTabular
returns arrow_dplyr_query
filter.arrow_dplyr_query
returns arrow_dplyr_query
...
https://github.com/pola-rs/r-polars/issues/759
Make a
tidypolars
class so that I can have my own print methods and more stuff. I don't want the user to have to do an extra step so maybe each of my functions could have areconstruct_tidypolars_output()
at the end that automatically adds the class. Sort of whatdplyr
does with some functions:Or maybe just keep
as_polars()
and rename itas_tidypolars()
? But then I would also have to run this after scanning/reading a file withpolars
.