Skip to content

Implement get_facet_fml() via tinyformula()/tinyframe() #612

Description

@zeileis

The tinyplot.formula() method uses auxiliary functions tinyformula()/tinyframe() (see https://github.com/grantmcdermott/tinyplot/blob/main/R/tinyformula.R) for processing its formulas, including facets.

In sanitize_facet() (see https://github.com/grantmcdermott/tinyplot/blob/main/R/sanitize_facet.R) an auxiliary function get_facet_fml() (see https://github.com/grantmcdermott/tinyplot/blob/main/R/facet.R#L680-L726) is used for cases when facet is still a formula. However, get_facet_fml() is not implemented using tinyformula()/tinyframe(). It might be a good idea to harmonize/streamline this implementation. This first came up in #562

As a first step, I tried to come up with an example when get_facet_fml() is actually used successfully. Could you provide an example, Grant @grantmcdermott ?

My reading is that this can only happen if tinyplot.default() is used because tinyplot.formula() already parses facet formulas and does not pass these on. But in tinyplot.default() I always get an error if I do tinyplot(x, y, facet = a ~ b) or tinyplot(x, y, facet = a ~ b, data = d).

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions