Skip to content

Argument overloading is not consistent for supernova::supernova() #4

@adamblake

Description

@adamblake

In the estimate extraction functions (b0(), b1(), fVal(), PRE()), you can supply either the result of lm() or the formula and data to be passed to lm(). This is not possible with supernova() which only accepts the result of lm().

library(supernova)

b0(lm(mpg ~ NULL, data = mtcars)) == b0(mpg ~ NULL, mtcars)
#> [1] TRUE

supernova(mpg ~ NULL, mtcars)
#> Error in supernova(mpg ~ NULL, mtcars) : unused argument (mtcars)

It would be nice to have supernova() overloaded to allow this and improve consistency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions