Skip to content

Guidelines on how to use custom extract() in distinct package? #210

Description

@MatthieuStigler

Hi

I would like to write a custom extract() function for a custom class and keep that extract.custom in an other package. Do you have guidelines on how to do this (instead of sending PR to texreg), similar to how one would do with a custom tidy function (Create your own broom tidier methods)?

I see for example that package panelvar uses:

extract <- function(model, ...) UseMethod("extract")
extract.pvargmm

and then in NAMESPACE:

export(extract)
S3method(extract,pvarfeols)

It seems this could create some issues, as discussed for tidy?

Please do not define tidy(), glance(), or augment() generics in your package. This will result in namespace conflicts whenever your package is used along other packages that also export tidying methods

Hence the question: do you have advice (or examples) on recommended way to add a custom extract, without sending it to texreg?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions