Skip to content

Always call as.matrix or as.array on the first argument #175

Closed
@bgoodri

Description

@bgoodri

If I have a stanreg object called post, then

bayesplot::mcmc_acf(post)

should just work, but it doesn't because the first argument is neither a matrix nor an array. But when no specific method is defined for stanreg objects, the bayesplot functions should just call as.matrix or as.array on the first argument internally, like apply and things like that do. That way we can accept anything that can be coerced into a matrix or an array without having to write methods for everything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions