Skip to content

Applying a function to each chain #353

Description

@n-kall

Are there simple ways (can be internal functions) to apply a function to each chain of a draws or rvar object?

For a draws object, I can do:

example_draws() |>
  extract_variable_matrix("mu") |>
  apply(MARGIN = 2, FUN = ess_bulk)

But the equivalent for an rvar is not immediately clear to me.

This is related to the automatic thinning via ess, which uses this method but if rvars become the default for summarise draws (#184 ), will need to be updated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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